- All Superinterfaces:
HasLabel,HasLocation,HasOther,HasRole,HasTime,HasType,Identifiable,Influence,QualifiedRelation,Relation,Statement,StatementOrBundle
- All Known Implementing Classes:
Used
public interface Used
extends Identifiable, HasLabel, HasType, HasTime, HasRole, HasLocation, HasOther, Influence
Interface for PROV Usage association.
PROV-DM Definition for Usage: Usage is the beginning of utilizing an entity by an activity. Before usage, the activity had not begun to utilize this entity and could not have been affected by the entity.
The constructor method ProvFactory.newUsed(QualifiedName, QualifiedName, QualifiedName) can be used to create an instance of Used.
The following code snippet creates a new usage statement, with a role attribute, and current time.
The instance of usage is given an identifier myId.
QualifiedName myId= ... ; // some qualified name
QualifiedName activityId= ... ; // some activity qualified name
QualifiedName entityId= ... ; // some entity qualified name
Used myUsed=provFactory.newUsed(myId,activityId,entityId);
myUsed.getRole().add(provFactory.newRole("parameter"));
myUsed.setTime(provFactory.newTimeNow())
Relevant Factory Methods:
-
ProvFactory.newUsed(QualifiedName, QualifiedName, QualifiedName) -
ModelConstructor.newUsed(QualifiedName, QualifiedName, QualifiedName, javax.xml.datatype.XMLGregorianCalendar, java.util.Collection)
Schema Definition:
The following schema fragment specifies the expected content contained within this class.
<complexType name="Usage">
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<sequence>
<element name="activity" type="{http://www.w3.org/ns/prov#}IDRef"/>
<element name="entity" type="{http://www.w3.org/ns/prov#}IDRef"/>
<element name="time" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
<element ref="{http://www.w3.org/ns/prov#}label" maxOccurs="unbounded" minOccurs="0"/>
<element ref="{http://www.w3.org/ns/prov#}location" maxOccurs="unbounded" minOccurs="0"/>
<element ref="{http://www.w3.org/ns/prov#}role" maxOccurs="unbounded" minOccurs="0"/>
<element ref="{http://www.w3.org/ns/prov#}type" maxOccurs="unbounded" minOccurs="0"/>
<any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
</sequence>
<attribute ref="{http://www.w3.org/ns/prov#}id"/>
</restriction>
</complexContent>
</complexType>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openprovenance.prov.model.StatementOrBundle
StatementOrBundle.Kind -
Method Summary
Modifier and TypeMethodDescriptionvoidsetActivity(QualifiedName aid) voidsetEntity(QualifiedName eid) Methods inherited from interface org.openprovenance.prov.model.HasLocation
getLocationMethods inherited from interface org.openprovenance.prov.model.Identifiable
getId, setIdMethods inherited from interface org.openprovenance.prov.model.StatementOrBundle
getKind
-
Method Details
-
setActivity
-
setEntity
-
getEntity
QualifiedName getEntity() -
getActivity
QualifiedName getActivity()
-