public class Interaction extends Measured
Modifier and Type | Method and Description |
---|---|
boolean |
addType(URI typeURI)
Adds the given type URI to this interaction's set of type URIs.
|
void |
clearParticipations()
Removes all entries of this interaction list of participations.
|
boolean |
containsType(URI typeURI)
Checks if the given type URI is included in this interaction's set of type URIs.
|
Participation |
createParticipation(String displayId,
String participantId,
Set<URI> roles)
Creates a child participation for this interaction with the given arguments, and then adds to this interaction's
list of participations.
|
Participation |
createParticipation(String displayId,
String participantId,
URI role)
Creates a child participation for this interaction with the given arguments,
and then adds to this interaction's list of participations.
|
Participation |
createParticipation(String displayId,
URI participant,
Set<URI> roles)
Creates a child participation for this interaction with the given arguments,
and then adds to this interaction's list of participations.
|
Participation |
createParticipation(String displayId,
URI participant,
URI role)
Creates a child participation for this interaction with the given arguments, and then adds to its list of participations.
|
boolean |
equals(Object obj) |
Participation |
getParticipation(String displayId)
Returns the participation matching the given display ID from
this interaction's list of participations.
|
Participation |
getParticipation(URI participationURI)
Returns the participation matching the given participation URI from this
interaction's list of participations.
|
Set<Participation> |
getParticipations()
Returns the set of participations owned by this
interaction.
|
Set<URI> |
getTypes()
Returns the set of type URIs owned by this Interaction object.
|
int |
hashCode() |
boolean |
removeParticipation(Participation participation)
Removes the given participation from this interaction's list of participations.
|
boolean |
removeType(URI typeURI)
Removes the given type URI from this interation's the set of type URIs.
|
void |
setTypes(Set<URI> types)
Clears the existing set of type URIs first, then adds the given
set of the type URIs to this interaction.
|
String |
toString() |
clearMeasures, createMeasure, getMeasure, getMeasure, getMeasures, removeMeasure
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 URI to be addedtrue
if this set did not contain the given type, false
otherwisepublic boolean removeType(URI typeURI) throws SBOLValidationException
typeURI
- the type URI to be removedtrue
if the matching type URI was removed successfully, false
otherwiseSBOLValidationException
- if the following SBOL validation rule was violated: 11902.public void setTypes(Set<URI> types) throws SBOLValidationException
types
- the given set of type URIs to set toSBOLValidationException
- if the following SBOL validation rule was violated: 11902.public Set<URI> getTypes()
public boolean containsType(URI typeURI)
typeURI
- the given type URI to be checked for existencetrue
if this set contains the given URI, false
otherwisepublic Participation createParticipation(String displayId, String participantId, URI role) throws SBOLValidationException
This method creates a new set of roles, and adds to it the given role. It then calls
createParticipation(String, String, Set)
with the given display IDs for the participation
and its reference participant, and the set of roles created in this method.
displayId
- the display ID of the participation to be createdparticipantId
- the display ID of the participant functional component referenced by the participation to be createdrole
- the role of the participation to be createdSBOLValidationException
- if an SBOL validation rule was violated in createParticipation(String, String, Set)
.public Participation createParticipation(String displayId, String participantId, Set<URI> roles) throws SBOLValidationException
This first method creates a compliant URI for the reference functional component of the participation, i.e., the participant property of the participation. This participant URI starts with the persistent identity of the module definition that hosts this interaction, followed by the particpant's display ID, and ends with the hosting module definition's version.
If no functional component exists with the provided participantId and isCreateDefaults is true, it creates a new functionalComponent instantiation for the componentDefinition with the displayId that matches the participantId.
This method then calls createParticipation(String, URI, Set)
with the given display ID, the
created compliant URI for the participant, and the set of roles.
displayId
- the display ID of the participation to be createdparticipantId
- the display ID of the participant functional componentroles
- the roles of the participation to be createdSBOLValidationException
- if either of the following condition is satisfied:
ModuleDefinition.createFunctionalComponent(String, AccessType, String, String, DirectionType)
createParticipation(String, URI, Set)
.public Participation createParticipation(String displayId, URI participant, URI role) throws SBOLValidationException
This method creates a new set of roles, and adds to it the given role. It then calls
createParticipation(String, URI, Set)
with the given display ID for the participation,
the URI identity of its reference participant, and the set of roles created in this method.
displayId
- the display ID of the participation to be createdparticipant
- the participant functional component for the participation to be createdrole
- the role of the participation to be createdSBOLValidationException
- if an SBOL validation rule violation occurred in createParticipation(String, URI, Set)
.public Participation createParticipation(String displayId, URI participant, Set<URI> roles) throws SBOLValidationException
This method first creates a compliant URI for the participation to be created. It starts with this Interaction object's persistent identity URI, followed by the given display ID, and ends with this interaction's version.
displayId
- The displayId identifier for thisparticipant
- specify precisely one FunctionalComponent object that plays the designated 3 role in its parent Interaction objectroles
- describes the behavior of a ParticipationSBOLValidationException
- if any of the following SBOL validation rules was violated:
10201, 10202, 10204, 10206, 12002, 12003, 12004,public boolean removeParticipation(Participation participation)
participation
- the given participation to be removedtrue
if the matching participation was removed successfully,
false
otherwisepublic Participation getParticipation(String displayId)
This method first creates a compliant URI for the participation to be retrieved. It starts with this interaction's persistent identity, followed by the given display ID, and ends with this interation's version.
displayId
- the display ID of the participation to be retrievednull
otherwisepublic Participation getParticipation(URI participationURI)
participationURI
- the identity URI for the participation to be retrievednull
otherwisepublic Set<Participation> getParticipations()
public void clearParticipations()
This method calls removeParticipation(Participation)
to iteratively remove
each participation owned by this object.