@rdf("http://www.w3.org/2002/07/owl#Nothing") @disjointWith({Thing.class}) public interface Nothing extends Thing { }
private boolean isDisjointWith(Class<?> type, Class<?> role) { disjointWith dist = role.getAnnotation(disjointWith.class); if (dist != null) { for (Class<?> c : dist.value()) { assert !c.isAssignableFrom(type) : role.getSimpleName() + " cannot be assigned to a " + type.getSimpleName(); } } return true; }
/** * A “was generated by” edge from an artifact to a process is a relationship intended to mean that the process was required to initiate its execution for the artifact to have been generated. When several artifacts are connected to a same process by multiple “was generated by” edges, the process had to have begun, for all of them to be generated. * * WasGeneratedBy is a class that encompasses all the properties defined by OPM for this kind of edge. It is a reification of the opmv:wasGeneratedBy property. * @see org.openprovenance.rdf.Artifact#getWasGeneratedBy */ @rdf("http://openprovenance.org/model/opmo#WasGeneratedBy") @disjointWith({WasTriggeredBy.class, Used.class, WasControlledBy.class, WasDerivedFrom.class}) public interface WasGeneratedBy extends Edge, EventEdge, UsedOrWasControlledByOrWasGeneratedBy, UsedOrWasGeneratedBy { /** The cause of a WasGeneratedBy edge. */ @rdf("http://openprovenance.org/model/opmo#causeWasGeneratedBy") Process getCauseWasGeneratedBy(); /** The cause of a WasGeneratedBy edge. */ void setCauseWasGeneratedBy(Process causeWasGeneratedBy); /** The effect of a WasGeneratedBy edge. */ @rdf("http://openprovenance.org/model/opmo#effectWasGeneratedBy") @inverseOf({"http://openprovenance.org/model/opmo#effectWasGeneratedByInverse", "http://openprovenance.org/model/opmo#effectInverse"}) Artifact getEffectWasGeneratedBy(); /** The effect of a WasGeneratedBy edge. */ void setEffectWasGeneratedBy(Artifact effectWasGeneratedBy); }
for (Class<?> c : dw.value()) { handleStatement(uri, OWL.DISJOINTWITH, createURI(c));
/** * A “used” edge from process to an artifact is a relationship intended to indicate that the process required the availability of the artifact to be able to complete its execution. When several artifacts are connected to a same process by multiple “used” edges, all of them were required for the process to complete. * * Used is a class that encompasses all the properties defined by OPM for this kind of edge. It is a reification of the opmv:used property. * @see org.openprovenance.rdf.Used */ @rdf("http://openprovenance.org/model/opmo#Used") @disjointWith({WasControlledBy.class, WasDerivedFrom.class, WasGeneratedBy.class, WasTriggeredBy.class}) public interface Used extends Edge, EventEdge, UsedOrWasControlledByOrWasGeneratedBy, UsedOrWasGeneratedBy { /** The cause of a Used edge. */ @rdf("http://openprovenance.org/model/opmo#causeUsed") Artifact getCauseUsed(); /** The cause of a Used edge. */ void setCauseUsed(Artifact causeUsed); /** The effect of a Used edge. */ @rdf("http://openprovenance.org/model/opmo#effectUsed") @inverseOf({"http://openprovenance.org/model/opmo#effectUsedInverse", "http://openprovenance.org/model/opmo#effectInverse"}) Process getEffectUsed(); /** The effect of a Used edge. */ void setEffectUsed(Process effectUsed); }
/** * An edge “was derived from” from artifact A2 to artifact A1 is a relationship that indicates that artifact A1 needs to have been generated for A2 to be generated. The piece of state associated with A2 is dependent on the presence of A1 or on the piece of state associated with A1 . * * WasDerivedFrom is a class that encompasses all the properties defined by OPM for this kind of edge. It is a reification of the opmv:wasDerivedFrom property. * @see org.openprovenance.rdf.Artifact#getWasDerivedFrom */ @rdf("http://openprovenance.org/model/opmo#WasDerivedFrom") @disjointWith({WasGeneratedBy.class, WasTriggeredBy.class, Used.class, WasControlledBy.class}) public interface WasDerivedFrom extends Edge { /** The cause of a WasDerivedFrom edge. */ @rdf("http://openprovenance.org/model/opmo#causeWasDerivedFrom") Artifact getCauseWasDerivedFrom(); /** The cause of a WasDerivedFrom edge. */ void setCauseWasDerivedFrom(Artifact causeWasDerivedFrom); /** The effect of a WasDerivedFrom edge. */ @rdf("http://openprovenance.org/model/opmo#effectWasDerivedFrom") @inverseOf({"http://openprovenance.org/model/opmo#effectWasDerivedFromInverse", "http://openprovenance.org/model/opmo#effectInverse"}) Set<Artifact> getEffectWasDerivedFrom(); /** The effect of a WasDerivedFrom edge. */ void setEffectWasDerivedFrom(Set<? extends Artifact> effectWasDerivedFrom); }
/** * An edge “was triggered by” from a process P2 to a process P1 is a causal dependency that indicates that the start of process P1 was required for P2 to be able to complete. * * WasTriggeredBy is a class that encompasses all the properties defined by OPM for this kind of edge. It is a reification of the opmv:wasTriggeredBy property. * @see org.openprovenance.dc.DcResource#getWasTriggeredBy */ @rdf("http://openprovenance.org/model/opmo#WasTriggeredBy") @disjointWith({Used.class, WasControlledBy.class, WasDerivedFrom.class, WasGeneratedBy.class}) public interface WasTriggeredBy extends Edge { /** The cause of a WasTriggeredBy edge. */ @rdf("http://openprovenance.org/model/opmo#causeWasTriggeredBy") Process getCauseWasTriggeredBy(); /** The cause of a WasTriggeredBy edge. */ void setCauseWasTriggeredBy(Process causeWasTriggeredBy); /** The effect of a WasTriggeredBy edge. */ @rdf("http://openprovenance.org/model/opmo#effectWasTriggeredBy") @inverseOf({"http://openprovenance.org/model/opmo#effectWasTriggeredByInverse", "http://openprovenance.org/model/opmo#effectInverse"}) Process getEffectWasTriggeredBy(); /** The effect of a WasTriggeredBy edge. */ void setEffectWasTriggeredBy(Process effectWasTriggeredBy); }
@disjointWith({WasDerivedFrom.class, WasGeneratedBy.class, WasTriggeredBy.class, Used.class}) public interface WasControlledBy extends Edge, UsedOrWasControlledByOrWasGeneratedBy {