public class FunctionalComponent extends ComponentInstance
Modifier and Type | Method and Description |
---|---|
void |
clearMapsTos()
Removes all entries of this object's list of
mapsTos.
|
MapsTo |
createMapsTo(String displayId,
RefinementType refinement,
String localId,
String remoteId)
Creates a child MapsTo instance for this module with the given arguments, and then adds to this module's list of mapsTos.
|
MapsTo |
createMapsTo(String displayId,
RefinementType refinement,
URI local,
URI remote)
Creates a child mapsTo for this functional component with the given arguments,
and then adds it to this functional compoennt's list of mapsTos.
|
boolean |
equals(Object obj) |
DirectionType |
getDirection()
Returns the direction property of this functional component.
|
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 object.
|
int |
hashCode() |
boolean |
removeMapsTo(MapsTo mapsTo)
Removes the given mapsTo.
|
void |
setDefinition(URI definition)
Sets the definition property to the given one.
|
void |
setDirection(DirectionType direction)
Sets the direction property of this functional component to the given one.
|
String |
toString() |
getAccess, getDefinition, getDefinitionIdentity, getDefinitionURI, setAccess
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 DirectionType getDirection()
public void setDirection(DirectionType direction) throws SBOLValidationException
direction
- The direction for the FunctionalComponentSBOLValidationException
- if the following SBOL validation rule violation occurred: 11802.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.public int hashCode()
hashCode
in class ComponentInstance
public boolean equals(Object obj)
equals
in class ComponentInstance
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 module's persistent identity URI, followed by
the given local component's display ID, followed by this module's version.
The compliant remote URI is created following the same pattern.
It then calls createMapsTo(String, RefinementType, URI, URI)
to create
a MapsTo instance.
This method automatically creates a local functional component 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 functional componentslocalId
- the display ID of the local functional componentremoteId
- the display ID of the remote functional componentSBOLValidationException
- if any of the following conditions is satisfied:
ModuleDefinition.createFunctionalComponent(String, AccessType, String, String, DirectionType)
; orcreateMapsTo(String, RefinementType, URI, URI)
.public MapsTo createMapsTo(String displayId, RefinementType refinement, URI local, URI remote) throws SBOLValidationException
The compliant mapsTo URI is created with this functional component's persistent identity URI, followed by the given mapsTo's display ID, followed by this functional component's version.
displayId
- the display ID of the mapsTo to be createdrefinement
- the refinement property of the mapsTo to be createdlocal
- the URI of the referenced local component instanceremote
- the URI of the referenced remote component instanceSBOLValidationException
- if any of the following SBOL validation rule was violated:
10201, 10202, 10204, 10206, 10802, 10803, 10804, 10805, 10807, 10808, 10809, 10811.public boolean removeMapsTo(MapsTo mapsTo)
mapsTo
- The mapsTo to be removedtrue
if the matching mapsTo was removed successfully,
false
otherwise.public MapsTo getMapsTo(String displayId)
displayId
- the display ID of the mapsTo to be retrievednull
otherwisepublic MapsTo getMapsTo(URI mapsToURI)
mapsToURI
- the URI for the mapsTo to be retrievednull
otherwisepublic Set<MapsTo> getMapsTos()
public void clearMapsTos()
public String toString()
toString
in class ComponentInstance