Package org.openprovenance.prov.vanilla
Class ModelConstructor
- java.lang.Object
-
- org.openprovenance.prov.vanilla.ModelConstructor
-
- All Implemented Interfaces:
AtomConstructor,ModelConstructor
public final class ModelConstructor extends Object implements ModelConstructor, AtomConstructor
-
-
Constructor Summary
Constructors Constructor Description ModelConstructor()
-
Method Summary
-
-
-
Method Detail
-
newActedOnBehalfOf
public ActedOnBehalfOf newActedOnBehalfOf(QualifiedName id, QualifiedName delegate, QualifiedName responsible, QualifiedName activity, Collection<Attribute> attributes)
A factory method to create an instance of a delegationActedOnBehalfOf- Specified by:
newActedOnBehalfOfin interfaceModelConstructor- Parameters:
id- identifier for the delegation association between delegate and responsibledelegate- identifier for the agent associated with an activity, acting on behalf of the responsible agentresponsible- identifier for the agent, on behalf of which the delegate agent actedactivity- optional identifier of an activity for which the delegation association holdsattributes- optional set of attributes representing additional information about this delegation association- Returns:
- an instance of
ActedOnBehalfOf
-
newActivity
public Activity newActivity(QualifiedName id, XMLGregorianCalendar startTime, XMLGregorianCalendar endTime, Collection<Attribute> attributes)
- Specified by:
newActivityin interfaceModelConstructor
-
newAgent
public Agent newAgent(QualifiedName id, Collection<Attribute> attributes)
- Specified by:
newAgentin interfaceModelConstructor
-
newAlternateOf
public AlternateOf newAlternateOf(QualifiedName e1, QualifiedName e2)
- Specified by:
newAlternateOfin interfaceModelConstructor
-
newDerivedByInsertionFrom
public DerivedByInsertionFrom newDerivedByInsertionFrom(QualifiedName id, QualifiedName after, QualifiedName before, List<Entry> keyEntitySet, Collection<Attribute> attributes)
- Specified by:
newDerivedByInsertionFromin interfaceModelConstructor
-
newDerivedByRemovalFrom
public DerivedByRemovalFrom newDerivedByRemovalFrom(QualifiedName id, QualifiedName after, QualifiedName before, List<Key> keys, Collection<Attribute> attributes)
- Specified by:
newDerivedByRemovalFromin interfaceModelConstructor
-
newDictionaryMembership
public DictionaryMembership newDictionaryMembership(QualifiedName dict, List<Entry> keyEntitySet)
- Specified by:
newDictionaryMembershipin interfaceModelConstructor
-
newDocument
public Document newDocument(Namespace namespace, Collection<Statement> statements, Collection<Bundle> bundles)
A factory method to create an instance of aDocument- Specified by:
newDocumentin interfaceModelConstructor- Parameters:
namespace- the prefix namespace mapping for the current documentstatements- a collection of statementsbundles- a collection of bundles- Returns:
- an instance of
Document, with this prefix-namespace mapping, statements, and bundles
-
newEntity
public Entity newEntity(QualifiedName id, Collection<Attribute> attributes)
- Specified by:
newEntityin interfaceModelConstructor
-
newHadMember
public HadMember newHadMember(QualifiedName c, Collection<QualifiedName> e)
- Specified by:
newHadMemberin interfaceModelConstructor
-
newMentionOf
public MentionOf newMentionOf(QualifiedName e2, QualifiedName e1, QualifiedName b)
- Specified by:
newMentionOfin interfaceModelConstructor
-
newNamedBundle
public Bundle newNamedBundle(QualifiedName id, Namespace namespace, Collection<Statement> statements)
A factory method to create an instance of a BundleBundle- Specified by:
newNamedBundlein interfaceModelConstructor- Parameters:
id- an identifier for the bundlenamespace- aNamespaceobject mapping prefix to namespace URIsstatements- a set of provenance descriptions- Returns:
Bundle
-
newQualifiedName
public QualifiedName newQualifiedName(String namespace, String local, String prefix)
A factory method forQualifiedName. A qualified name consists of a namespace, denoted by an optional prefix, and a local name.- Specified by:
newQualifiedNamein interfaceModelConstructor- Parameters:
namespace- a URI for the namespacelocal- a local nameprefix- a string, which can be null.- Returns:
- an instance of
QualifiedName
-
newQualifiedName
public QualifiedName newQualifiedName(String namespace, String local, String prefix, ProvUtilities.BuildFlag flag)
A factory method forQualifiedName. A qualified name consists of a namespace, denoted by an optional prefix, and a local name.- Specified by:
newQualifiedNamein interfaceModelConstructor- Parameters:
namespace- a URI for the namespacelocal- a local nameprefix- a string, which can be nullflag- build flag.- Returns:
- an instance of
QualifiedName
-
newSpecializationOf
public SpecializationOf newSpecializationOf(QualifiedName e2, QualifiedName e1)
- Specified by:
newSpecializationOfin interfaceModelConstructor
-
newUsed
public Used newUsed(QualifiedName id, QualifiedName activity, QualifiedName entity, XMLGregorianCalendar time, Collection<Attribute> attributes)
A factory method to create an instance of a UsageUsed- Specified by:
newUsedin interfaceModelConstructor- Parameters:
id- an optional identifier for a usageactivity- the identifier of the activity that used an entityentity- an optional identifier for the entity being usedtime- an optional "usage time", the time at which the entity started to be usedattributes- an optional set of attribute-value pairs representing additional information about this usage- Returns:
- an instance of
Used
-
newWasAssociatedWith
public WasAssociatedWith newWasAssociatedWith(QualifiedName id, QualifiedName activity, QualifiedName agent, QualifiedName plan, Collection<Attribute> attributes)
A factory method to create an instance of an AssociationWasAssociatedWith- Specified by:
newWasAssociatedWithin interfaceModelConstructor- Parameters:
id- an optional identifier for the association between an activity and an agentactivity- an identifier for the activityagent- an optional identifier for the agent associated with the activityplan- an optional identifier for the plan the agent relied on in the context of this activityattributes- an optional set of attribute-value pairs representing additional information about this association of this activity with this agent.- Returns:
- an instance of
WasAssociatedWith
-
newWasAttributedTo
public WasAttributedTo newWasAttributedTo(QualifiedName id, QualifiedName entity, QualifiedName agent, Collection<Attribute> attributes)
A factory method to create an instance of an attributionWasAttributedTo- Specified by:
newWasAttributedToin interfaceModelConstructor- Parameters:
id- an optional identifier for the relationentity- an entity identifieragent- the identifier of the agent whom the entity is ascribed to, and therefore bears some responsibility for its existenceattributes- an optional set of attribute-value pairs representing additional information about this attribution.- Returns:
- an instance of
WasAttributedTo
-
newWasDerivedFrom
public WasDerivedFrom newWasDerivedFrom(QualifiedName id, QualifiedName e2, QualifiedName e1, QualifiedName activity, QualifiedName generation, QualifiedName usage, Collection<Attribute> attributes)
A factory method to create an instance of a derivationWasDerivedFrom- Specified by:
newWasDerivedFromin interfaceModelConstructor- Parameters:
id- an optional identifier for a derivatione2- the identifier of the entity generated by the derivatione1- the identifier of the entity used by the derivationactivity-generation-usage-attributes-- Returns:
- an instance of
WasDerivedFrom
-
newWasEndedBy
public WasEndedBy newWasEndedBy(QualifiedName id, QualifiedName activity, QualifiedName trigger, QualifiedName ender, XMLGregorianCalendar time, Collection<Attribute> attributes)
A factory method to create an instance of an endWasEndedBy- Specified by:
newWasEndedByin interfaceModelConstructor- Parameters:
id-activity- an identifier for the ended activitytrigger- an optional identifier for the entity triggering the activity endingender- an optional identifier for the activity that generated the (possibly unspecified) entitytime- the optional time at which the activity was endedattributes- an optional set of attribute-value pairs representing additional information about this activity end- Returns:
- an instance of
WasStartedBy
-
newWasGeneratedBy
public WasGeneratedBy newWasGeneratedBy(QualifiedName id, QualifiedName entity, QualifiedName activity, XMLGregorianCalendar time, Collection<Attribute> attributes)
A factory method to create an instance of a generationWasGeneratedBy- Specified by:
newWasGeneratedByin interfaceModelConstructor- Parameters:
id- an optional identifier for a usageentity- an identifier for the created entityactivity- an optional identifier for the activity that creates the entitytime- an optional "generation time", the time at which the entity was completely createdattributes- an optional set of attribute-value pairs representing additional information about this generation- Returns:
- an instance of
WasGeneratedBy
-
newWasInfluencedBy
public WasInfluencedBy newWasInfluencedBy(QualifiedName id, QualifiedName influencee, QualifiedName influencer, Collection<Attribute> attributes)
A factory method to create an instance of an influenceWasInfluencedBy- Specified by:
newWasInfluencedByin interfaceModelConstructor- Parameters:
id- optional identifier identifying the associationinfluencee- an identifier for an entity, activity, or agentinfluencer- an identifier for an ancestor entity, activity, or agent that the former depends onattributes- an optional set of attribute-value pairs representing additional information about this association- Returns:
- an instance of
WasInfluencedBy
-
newWasInformedBy
public WasInformedBy newWasInformedBy(QualifiedName id, QualifiedName informed, QualifiedName informant, Collection<Attribute> attributes)
A factory method to create an instance of an communicationWasInformedBy- Specified by:
newWasInformedByin interfaceModelConstructor- Parameters:
id- an optional identifier identifying the association;informed- the identifier of the informed activity;informant- the identifier of the informant activity;attributes- an optional set of attribute-value pairs representing additional information about this communication.- Returns:
- an instance of
WasInformedBy
-
newWasInvalidatedBy
public WasInvalidatedBy newWasInvalidatedBy(QualifiedName id, QualifiedName entity, QualifiedName activity, XMLGregorianCalendar time, Collection<Attribute> attributes)
A factory method to create an instance of an invalidationWasInvalidatedBy- Specified by:
newWasInvalidatedByin interfaceModelConstructor- Parameters:
id- an optional identifier for a usageentity- an identifier for the created entityactivity- an optional identifier for the activity that creates the entitytime- an optional "invalidation time", the time at which the entity was completely createdattributes- an optional set of attribute-value pairs representing additional information about this invalidation- Returns:
- an instance of
WasInvalidatedBy
-
newWasStartedBy
public WasStartedBy newWasStartedBy(QualifiedName id, QualifiedName activity, QualifiedName trigger, QualifiedName starter, XMLGregorianCalendar time, Collection<Attribute> attributes)
A factory method to create an instance of a startWasStartedBy- Specified by:
newWasStartedByin interfaceModelConstructor- Parameters:
id-activity- an identifier for the started activitytrigger- an optional identifier for the entity triggering the activitystarter- an optional identifier for the activity that generated the (possibly unspecified) entitytime- the optional time at which the activity was startedattributes- an optional set of attribute-value pairs representing additional information about this activity start- Returns:
- an instance of
WasStartedBy
-
startBundle
public void startBundle(QualifiedName bundleId, Namespace namespace)
- Specified by:
startBundlein interfaceModelConstructor
-
startDocument
public void startDocument(Namespace namespace)
- Specified by:
startDocumentin interfaceModelConstructor
-
newRole
public Role newRole(Object value, QualifiedName type)
- Specified by:
newRolein interfaceAtomConstructor
-
newLocation
public Location newLocation(Object value, QualifiedName type)
- Specified by:
newLocationin interfaceAtomConstructor
-
newType
public Type newType(Object value, QualifiedName type)
- Specified by:
newTypein interfaceAtomConstructor
-
newLabel
public Label newLabel(Object value, QualifiedName type)
- Specified by:
newLabelin interfaceAtomConstructor
-
newInternationalizedString
public LangString newInternationalizedString(String s, String lang)
- Specified by:
newInternationalizedStringin interfaceAtomConstructor
-
newValue
public Value newValue(Object value, QualifiedName type)
- Specified by:
newValuein interfaceAtomConstructor
-
newOther
public Other newOther(QualifiedName elementName, Object value, QualifiedName type)
- Specified by:
newOtherin interfaceAtomConstructor
-
newInternationalizedString
public LangString newInternationalizedString(String s)
- Specified by:
newInternationalizedStringin interfaceAtomConstructor
-
-