public class Module extends Measured
Modifier and Type | Method and Description |
---|---|
void |
clearMapsTos()
Removes all entries of this module's list of mapsTos.
|
MapsTo |
createMapsTo(String displayId,
RefinementType refinement,
String localId,
String remoteId)
Creates a child mapsTo for this module 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 module with the given arguments, and then adds it to its list of mapsTos.
|
boolean |
equals(Object obj) |
ModuleDefinition |
getDefinition()
Returns the module definition that this module refers to.
|
URI |
getDefinitionIdentity()
Returns the module definition identity that this module refers to.
|
URI |
getDefinitionURI()
Returns the module definition URI that this module refers to.
|
MapsTo |
getMapsTo(String displayId)
Returns the mapsTo that matches the given display ID.
|
MapsTo |
getMapsTo(URI referenceURI)
Returns the MapsTo instance owned by this Module object that matches the given
referenceURI |
Set<MapsTo> |
getMapsTos()
Returns the set of MapsTo instances referenced by this Module object.
|
int |
hashCode() |
boolean |
removeMapsTo(MapsTo mapsTo)
Removes the given mapsTo from the list of mapsTos owned by this module.
|
void |
setDefinition(URI definitionURI)
Sets the reference definition URI to this module.
|
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 URI getDefinitionURI()
public URI getDefinitionIdentity()
public ModuleDefinition getDefinition()
public void setDefinition(URI definitionURI) throws SBOLValidationException
This method creates a compliant local and a compliant remote URIs.
They are created with this Module object's persistent ID,
the given localId
or remoteId
, and this Module object's version.
It then calls createMapsTo(String, RefinementType, URI, URI)
to create
a MapsTo instance.
definitionURI
- The definition URI for this Module.SBOLValidationException
- if either of the following SBOL validation rule was violated: 11702, 11703, 11704, 11705.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 module'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)
with the given mapsTo's display ID, its refinement type,
and the created compliant local and remote functional components' URIs.
This method calls ModuleDefinition.createFunctionalComponent(String, AccessType, String, String, DirectionType)
to automatically create a local functional component with the given display ID of referenced local component definition,
AccessType.PUBLIC
, an empty version string, and DirectionType.INOUT
, 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 functional componentremoteId
- the display ID of the remote functional componentSBOLValidationException
- if any of the following condition 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
This method creates a compliant URI for the mapsTo to be created. It starts with this module's persistent identity, followed by the mapsTo's display ID, and ends with this module'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 functional componentremote
- the identity URI of the remote functional componentSBOLValidationException
- if any of the following SBOL validation rules was violated:
10201, 10202, 10204, 10206, 10802, 10803, 10804, 10805, 10807, 10808, 10809, 10811, 11609.public boolean removeMapsTo(MapsTo mapsTo)
mapsTo
- the mapsTo to be removedtrue
if the matching mapsTo is removed successfully, false
otherwisepublic MapsTo getMapsTo(String displayId)
This method first creates a compliant URI for the mapsTo to be retrieved. It starts with this module's persistent identity, followed by the given display ID, and ends with this module's version.
displayId
- the display ID of the mapsTo to be retrievedpublic MapsTo getMapsTo(URI referenceURI)
referenceURI
referenceURI
- The MapsTo URI objectpublic Set<MapsTo> getMapsTos()
public void clearMapsTos()
This method calls removeMapsTo(MapsTo)
iteratively to remove each mapsTo at a time.