Class RejectedChange

java.lang.Object
org.incenp.obofoundry.kgcl.RejectedChange

public class RejectedChange extends Object
A change that could not be applied to the intended target graph.

A change that is perfectly valid according to the KGCL model may still fail to be applied to a knowledge graph, if the contents of the knowledge graph does not match what the change expects. For example:

  • obsolete EX:0001 will fail if the graph does not contain a node with ID EX:0001;
  • rename EX:0001 from "old label" to "new label" if the current label of node EX:0001 is not old label.

This class is merely a container for a tuple associating a KGCL change that could not be applied and a human-readable message explaining what the mismatch was.

  • Constructor Details

    • RejectedChange

      public RejectedChange(Change change, String reason)
      Creates a new instance.
      Parameters:
      change - The change that could not be applied.
      reason - The reason for rejecting the change.
  • Method Details

    • getChange

      public Change getChange()
      Gets the rejected change.
      Returns:
      The change that could not be applied.
    • getReason

      public String getReason()
      Gets the reason for rejection.
      Returns:
      A human-readable message explaining why the change could not be applied.