public class Activity extends TopLevel
ACTIVITY, AGENT, ANNOTATION, ATTACHMENT, COLLECTION, COMBINATORIAL_DERIVATION, COMPONENT_DEFINITION, EXPERIMENT, EXPERIMENTAL_DATA, GENERIC_TOP_LEVEL, IMPLEMENTATION, MODEL, MODULE_DEFINITION, PLAN, SEQUENCE
Modifier and Type | Method and Description |
---|---|
boolean |
addType(URI typeURI)
Adds the given type URI to this activity's set of type URIs.
|
boolean |
addWasInformedBy(Activity activity)
Adds the URI of the given Activity instance to this Activity's
set of wasInformdBy URIs.
|
boolean |
addWasInformedBy(String displayId)
Constructs a compliant activity URI using the given activity display ID, and then adds this URI to
this activity's set of wasInformedBy URIs.
|
boolean |
addWasInformedBy(String displayId,
String version)
Constructs a compliant activity URI with the given display ID and version, and then adds this URI
to this activity's set of wasInformedBy URIs.
|
boolean |
addWasInformedBy(URI activityURI)
Adds the given activity URI to this Activity's set of wasInformedBy URIs.
|
void |
clearAssociations()
Removes all entries of this activity's list of associations.
|
void |
clearUsages()
Removes all entries of this activity's list of usages.
|
void |
clearWasInformedBys()
Removes all entries of this activity's set of reference
wasInformedBy URIs.
|
boolean |
containsType(URI typeURI)
Checks if the given type URI is included in this activity's
set of type URIs.
|
Association |
createAssociation(String displayId,
URI agent)
Creates a child association for this activity with the given arguments,
and then adds to this activity's list of associations.
|
Usage |
createUsage(String displayId,
URI entity)
Creates a child usage for this activity with the given arguments,
and then adds to this activity's list of usages.
|
boolean |
equals(Object obj) |
Association |
getAssociation(String displayId)
Returns the association matching the given association's display ID.
|
Association |
getAssociation(URI associationURI)
Returns the instance matching the given association's identity URI.
|
Set<Association> |
getAssociations()
Returns the set of associations owned by this activity.
|
org.joda.time.DateTime |
getEndedAtTime() |
org.joda.time.DateTime |
getStartedAtTime() |
Set<URI> |
getTypes()
Returns the set of type URIs owned by this activity.
|
Usage |
getUsage(String displayId)
Returns the usage matching the given usage's display ID.
|
Usage |
getUsage(URI usageURI)
Returns the instance matching the given usage's identity URI.
|
Set<Usage> |
getUsages()
Returns the set of usages owned by this activity.
|
Set<URI> |
getWasInformedByIdentities()
Returns the set of wasInformedBys identities referenced by this activity.
|
Set<Activity> |
getWasInformedBys()
Returns the set of wasInformedBys referenced by this activity.
|
Set<URI> |
getWasInformedByURIs()
Returns the set of wasInformedBy URIs referenced by this activity.
|
int |
hashCode() |
boolean |
isSetEndedAtTime()
Test if the endedAtTime is set.
|
boolean |
isSetStartedAtTime()
Test if the startedAtTime is set.
|
boolean |
removeAssociation(Association association)
Removes the given association from the list of associations.
|
boolean |
removeType(URI typeURI)
Removes the given type URI from the set of types.
|
boolean |
removeUsages(Usage usage)
Removes the given usage from the list of usages.
|
void |
setEndedAtTime(org.joda.time.DateTime endedAtTime) |
void |
setStartedAtTime(org.joda.time.DateTime startedAtTime) |
void |
setTypes(Set<URI> types)
Clears the existing set of types first, then adds the given
set of the types to this activity.
|
void |
setWasInformedBys(Set<URI> wasInformedBys) |
String |
toString() |
addAttachment, addAttachment, addAttachment, clearAttachments, containsAttachment, getAttachments, getAttachmentURIs, removeAttachment, setAttachments
addWasDerivedFrom, addWasGeneratedBy, clearAnnotations, clearWasDerivedFroms, clearWasGeneratedBys, containsWasDerivedFrom, containsWasGeneratedBy, createAnnotation, createAnnotation, createAnnotation, createAnnotation, createAnnotation, createAnnotation, getAnnotation, getAnnotations, getDescription, getDisplayId, getIdentity, getName, getPersistentIdentity, getVersion, getWasDerivedFrom, getWasDerivedFroms, getWasGeneratedBys, hasAnnotations, isSetDescription, isSetDisplayId, isSetName, isSetPersistentIdentity, isSetVersion, isSetWasDerivedFrom, removeAnnotation, removeWasDerivedFrom, removeWasGeneratedBy, setDescription, setName, setWasDerivedFrom, setWasDerivedFroms, setWasGeneratedBys, unsetDescription, unsetName, unsetWasDerivedFrom
public boolean addType(URI typeURI)
typeURI
- the given type URItrue
if this set did not already contain the given type URI, false
otherwise.public boolean removeType(URI typeURI)
typeURI
- the specified type URItrue
if the matching type reference was removed successfully, false
otherwise.public void setTypes(Set<URI> types)
types
- the set of types to set topublic Set<URI> getTypes()
public boolean containsType(URI typeURI)
typeURI
- the type URI to be checkedtrue
if this set contains the given type URI, false
otherwise.public Association createAssociation(String displayId, URI agent) throws SBOLValidationException
This method first creates a compliant URI for the child association to be created. This URI starts with this activity's persistent identity, followed by the given display ID and ends with this activity's version.
displayId
- the display ID for the association to be createdagent
- URI for the agent associated with this activitySBOLValidationException
- if any of the following SBOL validation rules was violated:
12602, 12604, 12605, 12606public Usage createUsage(String displayId, URI entity) throws SBOLValidationException
This method first creates a compliant URI for the child usage to be created. This URI starts with this activity's persistent identity, followed by the given display ID and ends with this activity's version.
displayId
- the display ID for the usage to be createdentity
- URI reference to the entity usedSBOLValidationException
- if any of the following SBOL validation rules was violated:
12502, 12503public String toString()
toString
in class Identified
public boolean isSetStartedAtTime()
true
if it is not null
, or false
otherwisepublic org.joda.time.DateTime getStartedAtTime()
public void setStartedAtTime(org.joda.time.DateTime startedAtTime)
startedAtTime
- the startedAtTime to setpublic boolean isSetEndedAtTime()
true
if it is not null
, or false
otherwisepublic org.joda.time.DateTime getEndedAtTime()
public void setEndedAtTime(org.joda.time.DateTime endedAtTime)
endedAtTime
- the endedAtTime to setpublic boolean addWasInformedBy(Activity activity) throws SBOLValidationException
addWasInformedBy(URI)
with this Activity URI.activity
- the Activity instance whose identity URI to be addedtrue
if this set did not already contain the identity URI of the given Activity, false
otherwise.SBOLValidationException
- if the following SBOL validation rule was violated: 12407.public boolean addWasInformedBy(URI activityURI) throws SBOLValidationException
activityURI
- the identity URI of the Activity to be addedtrue
if this set did not already contain the given activity's URI, false
otherwise.SBOLValidationException
- if the following SBOL validation rule was violated: 12407.public boolean addWasInformedBy(String displayId, String version) throws SBOLValidationException
This method creates a compliant activity URI with the default
URI prefix, which was set in the SBOLDocument instance hosting this activity, the given
display ID and version. It then calls addWasInformedBy(URI)
with this Activity URI.
displayId
- the display ID of the activity whose identity URI is to be addedversion
- version of the activity whose identity URI is to be addedtrue
if this set did not already contain the given activity's URI, false
otherwise.SBOLValidationException
- see addWasInformedBy(URI)
public boolean addWasInformedBy(String displayId) throws SBOLValidationException
addWasInformedBy(String, String)
with
the given sequence display ID and an empty string as its version.displayId
- the display ID of the activity whose identity URI is to be addedtrue
if this set did not already contain the given activity's URI, false
otherwise.SBOLValidationException
- see addWasInformedBy(String, String)
public Set<URI> getWasInformedByURIs()
public Set<URI> getWasInformedByIdentities()
public Set<Activity> getWasInformedBys()
public void clearWasInformedBys()
public void setWasInformedBys(Set<URI> wasInformedBys) throws SBOLValidationException
wasInformedBys
- the wasInformedBys to setSBOLValidationException
- if an SBOL validation rule violation occurred in addWasInformedBy(URI)
public Association getAssociation(String displayId)
This method first creates a compliant URI for the association to be retrieved. It starts with this activity's persistent identity, followed by the given association's display ID, and ends with this activity's version.
displayId
- the display ID of the association to be retrievednull
otherwise.public Association getAssociation(URI associationURI)
associationURI
- the identity URI of the association to be retrievednull
otherwise.public Set<Association> getAssociations()
public boolean removeAssociation(Association association)
association
- the given associationtrue
if the matching association was removed successfully,
false
otherwise.public void clearAssociations()
This method calls removeAssociation(Association association)
to iteratively remove
each association.
public Usage getUsage(String displayId)
This method first creates a compliant URI for the usage to be retrieved. It starts with this activity's persistent identity, followed by the given usage's display ID, and ends with this activity's version.
displayId
- the display ID of the usage to be retrievednull
otherwise.public Usage getUsage(URI usageURI)
usageURI
- the identity URI of the usage to be retrievednull
otherwise.public Set<Usage> getUsages()
public boolean removeUsages(Usage usage)
usage
- the given usagetrue
if the matching usage was removed successfully,
false
otherwise.public void clearUsages()
This method calls removeUsages(Usage usage)
to iteratively remove
each usage.