Package org.incenp.obofoundry.kgcl
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:0001will fail if the graph does not contain a node with IDEX:0001;rename EX:0001 from "old label" to "new label"if the current label of nodeEX:0001is notold 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 Summary
Constructors Constructor Description RejectedChange(org.incenp.obofoundry.kgcl.model.Change change, String reason)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.incenp.obofoundry.kgcl.model.ChangegetChange()Gets the rejected change.StringgetReason()Gets the reason for rejection.
-
-
-
Constructor Detail
-
RejectedChange
public RejectedChange(org.incenp.obofoundry.kgcl.model.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 Detail
-
getChange
public org.incenp.obofoundry.kgcl.model.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.
-
-