public class Component extends ComponentInstance
Modifier and Type | Method and Description |
---|---|
boolean |
addRole(URI roleURI)
Adds the given role URI to this component's set of role URIs.
|
void |
clearMapsTos()
Removes all entries the list of mapsTos.
|
void |
clearRoles()
Removes all entries of this component's set of role URIs.
|
boolean |
containsRole(URI roleURI)
Checks if the given role URI is included in this component's set of role URIs.
|
MapsTo |
createMapsTo(String displayId,
RefinementType refinement,
String localId,
String remoteId)
Creates a child mapsTo for this component with the given arguments, and then adds it to its list of mapsTos.
|
MapsTo |
createMapsTo(String displayId,
RefinementType refinement,
URI local,
URI remote)
Creates a child mapsTo for this component with the given arguments,
and then adds it to its list of mapsTos.
|
boolean |
equals(Object obj) |
MapsTo |
getMapsTo(String displayId)
Returns the mapsTo that matches the given display ID.
|
MapsTo |
getMapsTo(URI mapsToURI)
Returns the mapsTo that matches the given URI.
|
Set<MapsTo> |
getMapsTos()
Returns the set of mapsTos owned by this instance.
|
RoleIntegrationType |
getRoleIntegration()
Returns the roleIntegration property of this object.
|
Set<URI> |
getRoles()
Returns the set of role URIs owned by this component.
|
int |
hashCode() |
boolean |
isSetRoleIntegration()
Test if the roleIntegration property is set.
|
boolean |
removeMapsTo(MapsTo mapsTo)
Removes the given mapsTo from the list of
mapsTos.
|
boolean |
removeRole(URI roleURI)
Removes the given role URI from the set of roles.
|
void |
setDefinition(URI definition)
Sets the definition property to the given one.
|
void |
setRoleIntegration(RoleIntegrationType roleIntegration)
Sets the roleIntegration property of this object to the given one.
|
void |
setRoles(Set<URI> roles)
Clears the existing set of roles first, and then adds the given
set of the roles to this component.
|
String |
toString() |
void |
unsetRoleIntegration()
Sets the roleIntegration property of this object to
null . |
getAccess, getDefinition, getDefinitionURI, setAccess
addWasDerivedFrom, clearAnnotations, clearWasDerivedFroms, containsWasDerivedFrom, createAnnotation, createAnnotation, createAnnotation, createAnnotation, createAnnotation, createAnnotation, getAnnotation, getAnnotations, getDescription, getDisplayId, getIdentity, getName, getPersistentIdentity, getVersion, getWasDerivedFrom, getWasDerivedFroms, hasAnnotations, isSetDescription, isSetDisplayId, isSetName, isSetPersistentIdentity, isSetVersion, isSetWasDerivedFrom, removeAnnotation, removeWasDerivedFrom, setDescription, setName, setWasDerivedFrom, setWasDerivedFroms, unsetDescription, unsetName, unsetWasDerivedFrom
public boolean addRole(URI roleURI) throws SBOLValidationException
roleURI
- the role URI to be addedtrue
if this set did not already contain the specified role, false
otherwise.SBOLValidationException
- if RoleIntegration is not set (10709).public boolean removeRole(URI roleURI)
roleURI
- the given role URI to be removedtrue
if the matching role reference was removed successfully, false
otherwise.public void setRoles(Set<URI> roles) throws SBOLValidationException
roles
- the set of roles to be setSBOLValidationException
- if RoleIntegration is not set (10709).public Set<URI> getRoles()
public 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 boolean isSetRoleIntegration()
true
if it is not null
public RoleIntegrationType getRoleIntegration()
public void setRoleIntegration(RoleIntegrationType roleIntegration) throws SBOLValidationException
roleIntegration
- indicates how role is to be integrated with related roles.SBOLValidationException
- if there are roles on this Component (10709).public void unsetRoleIntegration() throws SBOLValidationException
null
.SBOLValidationException
- if there are roles on this Component (10709).public MapsTo createMapsTo(String displayId, RefinementType refinement, String localId, String remoteId) throws SBOLValidationException
This method creates compliant local and remote URIs first.
The compliant local URI is created with this component's persistent identity URI, followed by
the given local component's display ID, followed by this component's version.
The compliant remote URI is created following the same pattern.
It then calls createMapsTo(String, RefinementType, URI, URI)
with the given mapsTo's display ID, its refinement type,
and the created compliant local and remote components' URIs.
This method calls ComponentDefinition.createComponent(String, AccessType, String, String)
to automatically
create a local component with the given display ID of referenced local component definition,
AccessType.PUBLIC
, and an empty version string, if all of the following conditions are satisfied:
null
;SBOLDocument.isCreateDefaults()
returns true
;displayId
- the display ID of the mapsTo to be createdrefinement
- the relationship between the local and remote componentslocalId
- the display ID of the local componentremoteId
- the display ID of the remote componentSBOLValidationException
- if any of the following condition is satisfied:
ComponentDefinition.createComponent(String, AccessType, String, String)
; orcreateMapsTo(String, RefinementType, URI, URI)
.public MapsTo createMapsTo(String displayId, RefinementType refinement, URI local, URI remote) throws SBOLValidationException
This method creates a compliant URI for the mapsTo to be created. It starts with this component's persistent identity, followed by the mapsTo's display ID, and ends with this component's version.
displayId
- the display ID of the mapsTo to be createdrefinement
- the relationship between the local and remote componentslocal
- the identity URI of the local componentremote
- the identity URI of the remote componentSBOLValidationException
- if any of the following SBOL validation rules was violated:
10201, 10202, 10204, 10206, 10526, 10802, 10803, 10804, 10805, 10807, 10808, 10809, 10811.public boolean removeMapsTo(MapsTo mapsTo)
mapsTo
- a mapsTo to be removedtrue
if the matching mapsTo is removed successfully,
false
otherwise.public MapsTo getMapsTo(String displayId)
This method first creates a compliant URI for the mapsTo to be retrieved. It starts with this component's persistent identity, followed by the given display ID, and ends with this component's version.
displayId
- the display ID of the mapsTo to be retrievedpublic MapsTo getMapsTo(URI mapsToURI)
mapsToURI
- The URI of the mapsTo to be retrievedpublic Set<MapsTo> getMapsTos()
public void clearMapsTos()
public void setDefinition(URI definition) throws SBOLValidationException
setDefinition
in class ComponentInstance
definition
- the given definition URI to set toSBOLValidationException
- if either of the following SBOL validation rules was violated: 10604, 10605.public int hashCode()
hashCode
in class ComponentInstance
public boolean equals(Object obj)
equals
in class ComponentInstance
public String toString()
toString
in class ComponentInstance
Copyright © 2017. All rights reserved.