use of org.sbolstandard.core2.GenericLocation in project libSBOLj by SynBioDex.
the class SequenceAnnotation method addGenericLocation.
/**
* Creates a generic location with the given arguments and then adds it to this sequence annotation's
* list of locations.
* <p>
* This method first creates a compliant URI for the generic location to be created.
* It starts with this sequence annotation's persistent identity URI,
* followed by the given display ID, and ends an empty string for version.
*
* @param displayId the display ID for the generic location to be created
* @param orientation the orientation type
* @return the created generic location instance
* @throws SBOLValidationException if any of the following SBOL validation rules was violated:
* 10201, 10202, 10204, 10206.
*/
public GenericLocation addGenericLocation(String displayId, OrientationType orientation) throws SBOLValidationException {
URI identity = createCompliantURI(this.getPersistentIdentity().toString(), displayId, this.getVersion());
GenericLocation genericLocation = new GenericLocation(identity);
genericLocation.setPersistentIdentity(createCompliantURI(this.getPersistentIdentity().toString(), displayId, ""));
genericLocation.setDisplayId(displayId);
genericLocation.setVersion(this.getVersion());
genericLocation.setOrientation(orientation);
addLocation(genericLocation);
return genericLocation;
}
Aggregations