public class Usage extends Identified
Modifier and Type | Method and Description |
---|---|
boolean |
addRole(ActivityRoleType role)
Adds the given role to this usage's set of roles.
|
boolean |
addRole(URI roleURI)
Adds the given role URI to this usage's set of role URIs.
|
void |
clearRoles()
Removes all entries of this usage's set of role URIs.
|
boolean |
containsRole(URI roleURI)
Checks if the given role URI is included in this usage's set of role URIs.
|
boolean |
equals(Object obj) |
TopLevel |
getEntity()
Returns the entity referenced by this usage.
|
URI |
getEntityIdentity()
Returns the entity identity referenced by this usage.
|
URI |
getEntityURI()
Returns the reference entity URI.
|
Set<URI> |
getRoles()
Returns the set of role URIs owned by this usage.
|
int |
hashCode() |
boolean |
removeRole(URI roleURI)
Removes the given role URI from the set of roles.
|
void |
setEntity(URI entity) |
void |
setRoles(Set<URI> roles)
Clears the existing set of roles first, and then adds the given
set of the roles to this usage.
|
String |
toString() |
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 int hashCode()
hashCode
in class Identified
public boolean equals(Object obj)
equals
in class Identified
public URI getEntityURI()
public URI getEntityIdentity()
null
if the associated SBOLDocument instance is null
or no matching
entity identity referenced by this usage exists;
or the matching entity otherwise.public TopLevel getEntity()
null
if the associated SBOLDocument instance is null
or no matching
entity referenced by this usage exists;
or the matching entity otherwise.public void setEntity(URI entity) throws SBOLValidationException
entity
- the entity to setSBOLValidationException
- if the following SBOL validation rule was violated: 12502.public boolean addRole(URI roleURI)
roleURI
- the role URI to be addedtrue
if this set did not already contain the specified role, false
otherwise.public boolean addRole(ActivityRoleType role)
role
- the role to be addedtrue
if this set did not already contain the specified role, false
otherwise.public boolean removeRole(URI roleURI)
roleURI
- the given role URI to be removedtrue
if the matching role reference was removed successfully, false
otherwise.public Set<URI> getRoles()
public void setRoles(Set<URI> roles)
roles
- the set of roles to set topublic boolean containsRole(URI roleURI)
roleURI
- the role URI to be checkedtrue
if this set contains the given role URI, false
otherwise.public void clearRoles()
public String toString()
toString
in class Identified