public final class SBOLFactory extends Object
Constructor and Description |
---|
SBOLFactory() |
Modifier and Type | Method and Description |
---|---|
static void |
addNamespace(QName qName)
Adds the given namespace QName to the internal SBOL document used by the factory.
|
static void |
addNamespace(URI namespaceURI,
String prefix)
Adds the given namespace URI and its prefix to the internal SBOL document used by the factory.
|
static void |
clear()
Sets the internal SBOL document used by the factory to a new SBOL document.
|
static void |
clearCollections()
Removes all entries in the list of collections owned by the internal SBOL document of
the factory.
|
static void |
clearComponentDefinitions()
Removes all entries in the list of component definitions
owned by the internal SBOL document of the factory.
|
static void |
clearGenericTopLevels()
Removes all entries in the list of generic top-levels
owned by the internal SBOL document of the factory.
|
static void |
clearModels()
Removes all entries in the list of models owned by the internal SBOL document
of thie factory.
|
static void |
clearModuleDefinitions()
Removes all entries in the list of module definitions
owned by the internal SBOL document of the factory.
|
static void |
clearNamespaces()
Removes all non-required namespaces from the internal SBOL document of the factory.
|
static void |
clearSequences()
Removes all entries in the list of sequences owned by the internal SBOL document of
the factory.
|
static Collection |
createCollection(String displayId)
Creates a collection first, and then adds to the factory's internal SBOL document's list of collections.
|
static Collection |
createCollection(String displayId,
String version)
Creates a collection first, and then adds to the factory's internal SBOL document's list of collections.
|
static Collection |
createCollection(String URIprefix,
String displayId,
String version)
Creates a collection first, and then adds to factory's internal SBOL document's list of collections.
|
static ComponentDefinition |
createComponentDefinition(String displayId,
Set<URI> types)
Creates a component definition, and then adds it to the factory's internal SBOL document's list of component definitions.
|
static ComponentDefinition |
createComponentDefinition(String displayId,
String version,
Set<URI> types)
Creates a component definition, and then adds it to the factory's internal SBOL document's list of component definitions.
|
static ComponentDefinition |
createComponentDefinition(String URIprefix,
String displayId,
String version,
Set<URI> types)
Creates a component definition, and then adds it to the factory's internal SBOL document's list of component definitions.
|
static ComponentDefinition |
createComponentDefinition(String URIprefix,
String displayId,
String version,
URI type)
Creates a component definition, and then adds it to the factory's internal SBOL document's list of component definitions.
|
static ComponentDefinition |
createComponentDefinition(String displayId,
String version,
URI type)
Creates a component definition, and then adds it to the factory's internal SBOL document's list of component definitions.
|
static ComponentDefinition |
createComponentDefinition(String displayId,
URI type)
Creates a component definition, and then adds it to the factory's internal SBOL document's list of component definitions.
|
static void |
createCopy(SBOLDocument document)
Creates an identical copy of each top-level element of the given SBOL document, and then adds the created top-level to the corresponding
list of top-levels in the factory's internal SBOL document.
|
static TopLevel |
createCopy(TopLevel topLevel)
Creates an identical copy of the given top-level, and then adds the created top-level to the
corresponding list of top-levels in the factory's internal SBOL document.
|
static TopLevel |
createCopy(TopLevel topLevel,
String displayId)
Creates an identical copy of the given top-level, and then adds the created top-level to the
corresponding list of top-levels in the factory's internal SBOL document.
|
static TopLevel |
createCopy(TopLevel topLevel,
String displayId,
String version)
Creates an identical copy of the given top-level, and then adds the created top-level to the
corresponding list of top-levels in the factory's internal SBOL document.
|
static TopLevel |
createCopy(TopLevel topLevel,
String URIprefix,
String displayId,
String version)
Creates an identical copy of the given top-level, and then adds the created top-level to the
corresponding list of top-levels in the factory's internal SBOL document.
|
static GenericTopLevel |
createGenericTopLevel(String displayId,
QName rdfType)
Creates a generic top-level, and then adds it to the factory's internal SBOL document's list of generic top-levels.
|
static GenericTopLevel |
createGenericTopLevel(String displayId,
String version,
QName rdfType)
Creates a generic top-level, and then adds it to the factory's internal SBOL document's list of generic top-levels.
|
static GenericTopLevel |
createGenericTopLevel(String URIprefix,
String displayId,
String version,
QName rdfType)
Creates a generic top-level, and then adds it to the factory's internal SBOL document's list of generic top-levels.
|
static Model |
createModel(String URIprefix,
String displayId,
String version,
URI source,
URI language,
URI framework)
Creates a model, and then adds it to the factory's internal SBOL document's list of models.
|
static Model |
createModel(String displayId,
String version,
URI source,
URI language,
URI framework)
Creates a model, and then adds it to the factory's internal SBOL document's list of models.
|
static Model |
createModel(String displayId,
URI source,
URI language,
URI framework)
Creates a model, and then adds it to the factory's internal SBOL document's list of models.
|
static ModuleDefinition |
createModuleDefinition(String displayId)
Creates a module definition, and then adds it to the factory's internal SBOL document's list of module definitions.
|
static ModuleDefinition |
createModuleDefinition(String displayId,
String version)
Creates a module definition, and then adds it to the factory's internal SBOL document's list of module definitions.
|
static ModuleDefinition |
createModuleDefinition(String URIprefix,
String displayId,
String version)
Creates a module definition, and then adds it to the factory's internal SBOL document's list of module definitions.
|
static SBOLDocument |
createRecursiveCopy(TopLevel topLevel)
Creates an identical copy of the given top-level and returns it in
a new SBOL document.
|
static Sequence |
createSequence(String URIprefix,
String displayId,
String version,
String elements,
URI encoding)
Creates a sequence with the given arguments, and then adds it to the factory's internal
SBOL document's list of sequences.
|
static Sequence |
createSequence(String displayId,
String version,
String elements,
URI encoding)
Creates a sequence with the given arguments, and then adds it to the factory's internal
SBOL document's list of sequences.
|
static Sequence |
createSequence(String displayId,
String elements,
URI encoding)
Creates a sequence with the given arguments, and then adds it to the factory's internal
SBOL document's list of sequences.
|
boolean |
equals(Object obj) |
static Set<TopLevel> |
getByWasDerivedFrom(URI wasDerivedFrom)
Retrieves a set of top-levels in the factory's internal SBOL document whose wasDerivedFrom field matches the given one.
|
static Collection |
getCollection(String displayId,
String version)
Returns the collection matching the given display ID and version from the factory's internal
SBOL document's list of collections.
|
static Collection |
getCollection(URI collectionURI)
Returns the collection matching the given identity URI from the factory's internal
SBOL document's list of collections.
|
static Set<Collection> |
getCollections()
Returns the set of collections owned by the factory's internal SBOL document
|
static ComponentDefinition |
getComponentDefinition(String displayId,
String version)
Returns the component definition matching the given display ID and version from
the factory's internal SBOL document's list of component definitions.
|
static ComponentDefinition |
getComponentDefinition(URI componentDefinitionURI)
Returns the component definition matching the given identity URI from the factory's
internal SBOL document's list of component definitions.
|
static Set<ComponentDefinition> |
getComponentDefinitions()
Returns the set of component definitions owned by the factory's
internal SBOL document.
|
static String |
getDefaultURIprefix()
Returns the default URI prefix of the factory's internal SBOL document.
|
static GenericTopLevel |
getGenericTopLevel(String displayId,
String version)
Returns the generic top-level matching the given display ID and version from
the factory's internal SBOL document's list of generic top-levels.
|
static GenericTopLevel |
getGenericTopLevel(URI topLevelURI)
Returns the generic top-level matching the given identity URI from
the factory's internal SBOL document's list of generic top-levels.
|
static Set<GenericTopLevel> |
getGenericTopLevels()
Returns the set of generic topLevels owned by the factory's internal SBOL document.
|
static Model |
getModel(String displayId,
String version)
Returns the model matching the given display ID and version from
the factory's internal SBOL document's list of models.
|
static Model |
getModel(URI modelURI)
Returns the model matching the given identity URI from
the factory's internal SBOL document's list of models.
|
static Set<Model> |
getModels()
Returns the set of models owned by the factory's internal SBOL document.
|
static ModuleDefinition |
getModuleDefinition(String displayId,
String version)
Returns the module definition matching the given display ID and version from the factory's internal SBOL document's
list of module definitions.
|
static ModuleDefinition |
getModuleDefinition(URI moduleURI)
Returns the module definition matching the given identity URI from
the factory's internal SBOL document's list of module definitions.
|
static Set<ModuleDefinition> |
getModuleDefinitions()
Returns the set of module definitions owned by the factory's internal SBOL document.
|
static QName |
getNamespace(URI namespaceURI)
Returns the QName matching the given namespace URI from the factory's internal SBOL document's list of QNames.
|
static List<QName> |
getNamespaces()
Returns the list of namespace bindings owned by the factory's internal SBOL document.
|
static Set<ComponentDefinition> |
getRootComponentDefinitions()
Returns the set of root component definitions.
|
static Sequence |
getSequence(String displayId,
String version)
Returns the sequence matching the given display ID and version from the factory's internal SBOL document's
list of sequences.
|
static Sequence |
getSequence(URI sequenceURI)
Returns the sequence matching the given identity URI from the factory's internal SBOL document's
list of sequences.
|
static Set<Sequence> |
getSequences()
Returns the set of sequences owned by the factory's internal SBOL document.
|
static TopLevel |
getTopLevel(URI topLevelURI)
Returns the top-level matching the given identity URI from the factory's internal SBOL document's
list of top-levels.
|
static Set<TopLevel> |
getTopLevels()
Returns the set of top-levels owned by the factory's internal SBOL document.
|
int |
hashCode() |
static boolean |
isComplete()
Returns the value of the complete flag in the factory's internal SBOL document.
|
static boolean |
isCompliant()
Returns the value of the compliant flag in the factory's internal SBOL document.
|
static boolean |
isCreateDefaults()
Returns the value of the createDefaults flag in the factory's internal SBOL document.
|
static boolean |
isTypesInURIs()
Returns the value of the typesInURI flag in the factory's internal SBOL document.
|
static void |
read(File file)
Takes in a given RDF file and adds the data read to the factory's internal SBOL document.
|
static void |
read(InputStream in)
Takes in a given RDF input stream and add the data read to the factory's internal SBOL document.
|
static void |
read(String fileName)
Takes in a given RDF file name and add the data read to the factory's internal SBOL document.
|
static boolean |
removeCollection(Collection collection)
Removes the given collection from the factory's internal SBOL document's list of collections.
|
static boolean |
removeComponentDefinition(ComponentDefinition componentDefinition)
Removes the given component definition from the factory's internal SBOL document's list of component definitions.
|
static boolean |
removeGenericTopLevel(GenericTopLevel genericTopLevel)
Removes the given generic top-level from the factory's internal SBOL document's list of generic top-levels.
|
static boolean |
removeModel(Model model)
Removes the given model from the factory's internal SBOL document's list of models.
|
static boolean |
removeModuleDefinition(ModuleDefinition moduleDefinition)
Removes the given module definition from this SBOL document's list of module definitions.
|
static void |
removeNamespace(URI namespaceURI)
Removes the given namespace URI from the factory's internal SBOL document.
|
static boolean |
removeSequence(Sequence sequence)
Removes the given sequence from the factory's internal SBOL document's list of sequences.
|
static void |
setComplete(boolean complete)
Sets the complete flag to the given value.
|
static void |
setCreateDefaults(boolean createDefaults)
Sets the createDefaults flag to the given value.
|
static void |
setDefaultURIprefix(String defaultURIprefix)
Sets the default URI prefix to the given one.
|
static void |
setSBOLDocument(SBOLDocument sbolDocument)
Sets the internal SBOL document used by the factory to the given one.
|
static void |
setTypesInURIs(boolean typesInURIs)
Sets the typesInURIs flag to the given value.
|
String |
toString() |
static void |
write(File file)
Outputs the factory's internal SBOL document's data from the RDF/XML serialization to the given file.
|
static void |
write(File file,
String fileType)
Outputs the factory's internal SBOL document's data from the serialization in the given serialization format to the given file.
|
static void |
write(OutputStream out)
Outputs the factory's internal SBOL document's data from the RDF/XML serialization to the given output stream.
|
static void |
write(OutputStream out,
String fileType)
Outputs the factory's internal SBOL document's data from the serialization in the given serialization format to the given output stream.
|
static void |
write(String filename)
Outputs the factory's internal SBOL document's data from the RDF/XML serialization to a new file with the given file name.
|
static void |
write(String filename,
String fileType)
Outputs the factory's internal SBOL document's data from serialization in the given serialization format
to a new file with the given file name.
|
public static void setSBOLDocument(SBOLDocument sbolDocument)
sbolDocument
- the SBOL document used internally by the factorypublic static void clear()
public static ModuleDefinition createModuleDefinition(String displayId) throws SBOLValidationException
This method calls SBOLDocument.createModuleDefinition(String)
by passing the given
display ID.
displayId
- the display ID of the module definition to be createdSBOLValidationException
- if an SBOL validation rule was violated in SBOLDocument.createModuleDefinition(String)
.public static ModuleDefinition createModuleDefinition(String displayId, String version) throws SBOLValidationException
This method calls SBOLDocument.createModuleDefinition(String, String)
by passing the given
display ID and version.
displayId
- the display ID of the module definition to be createdversion
- the version of the module definition to be createdSBOLValidationException
- if an SBOL validation rule was violated in
SBOLDocument.createModuleDefinition(String, String)
.public static ModuleDefinition createModuleDefinition(String URIprefix, String displayId, String version) throws SBOLValidationException
This method calls SBOLDocument.createModuleDefinition(String, String, String)
by passing the given
display ID and version.
URIprefix
- the URI prefix used to construct the compliant URI for the module definition to be createddisplayId
- the display ID of the module definition to be createdversion
- the version of the module definition to be createdSBOLValidationException
- if an SBOL validation rule was violated in
SBOLDocument.createModuleDefinition(String, String, String)
.public static boolean removeModuleDefinition(ModuleDefinition moduleDefinition) throws SBOLValidationException
This method calls SBOLDocument.removeModuleDefinition(ModuleDefinition)
.
moduleDefinition
- the module definition to be removedtrue
if the given module definition was successfully removed, false
otherwiseSBOLValidationException
- if an SBOL validation rule was violated in SBOLDocument.removeModuleDefinition(ModuleDefinition)
.public static ModuleDefinition getModuleDefinition(String displayId, String version)
This method calls SBOLDocument.getModuleDefinition(String, String)
with the given
arguments.
displayId
- the display ID of the module definition to be retrievedversion
- the version of the module definition to be retrievednull
otherwisepublic static ModuleDefinition getModuleDefinition(URI moduleURI)
This method calls SBOLDocument.getModuleDefinition(URI)
with the given argument.
moduleURI
- the give identity URI of the module definition to be retrievednull
otherwisepublic static Set<ModuleDefinition> getModuleDefinitions()
public static void clearModuleDefinitions() throws SBOLValidationException
SBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.clearModuleDefinitions()
.public static Collection createCollection(String displayId) throws SBOLValidationException
This method calls SBOLDocument.createCollection(String)
with the given display ID.
displayId
- the display ID of the collection to be createdSBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.createCollection(String)
.public static Collection createCollection(String displayId, String version) throws SBOLValidationException
This method calls SBOLDocument.createCollection(String, String)
with the given display ID and version.
displayId
- the display ID of the collection to be createdversion
- the version of the collection to be createdSBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.createCollection(String, String)
.public static Collection createCollection(String URIprefix, String displayId, String version) throws SBOLValidationException
This method calls SBOLDocument.createCollection(String, String, String)
with the
given URI prefix, display ID, and version.
URIprefix
- the URI prefix for the collection to be createddisplayId
- the display ID of the collection to be createdversion
- the version of the collection to be createdSBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.createCollection(String, String, String)
.public static boolean removeCollection(Collection collection) throws SBOLValidationException
This method calls SBOLDocument.removeCollection(Collection)
.
collection
- the collection to be removedtrue
if the given collection was successfully removed, false
otherwiseSBOLValidationException
- if an SBOL validation rule violation occurred in SBOLDocument.removeCollection(Collection)
.public static Collection getCollection(String displayId, String version)
This method calls SBOLDocument.getCollection(String, String)
with the given arguments.
displayId
- the display ID of the collection to be retrievedversion
- the version of the collection to be retrievednull
otherwise.public static Collection getCollection(URI collectionURI)
This method calls SBOLDocument.getCollection(URI)
with the given argument.
collectionURI
- the given identity URI of the collection to be retrievednull
otherwisepublic static Set<Collection> getCollections()
This method calls SBOLDocument.getCollections()
.
public static void clearCollections() throws SBOLValidationException
SBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.clearCollections()
.public static Model createModel(String displayId, URI source, URI language, URI framework) throws SBOLValidationException
This method calls SBOLDocument.createModel(String, String, URI, URI, URI)
with the given arguments
and an empty string for version.
displayId
- the display ID of the model to be createdsource
- the source of the model to be createdlanguage
- the language of the model to be createdframework
- the framework of the model to be createdSBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.createModel(String, String, URI, URI, URI)
.public static Model createModel(String displayId, String version, URI source, URI language, URI framework) throws SBOLValidationException
This method calls SBOLDocument.createModel(String, String, URI, URI, URI)
with the given arguments.
displayId
- the display ID of the model to be createdversion
- the version of the model to be createdsource
- the source of the model to be createdlanguage
- the language of the model to be createdframework
- the framework of the model to be createdSBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.createModel(String, String, URI, URI, URI)
.public static Model createModel(String URIprefix, String displayId, String version, URI source, URI language, URI framework) throws SBOLValidationException
This method calls SBOLDocument.createModel(String, String, String, URI, URI, URI)
with the given arguments.
URIprefix
- the URI prefix used to construct the compliant URI for the model to be createddisplayId
- the display ID of the model to be createdversion
- the version of the model to be createdsource
- the source of the model to be createdlanguage
- the language of the model to be createdframework
- the framework of the model to be createdSBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.createModel(String, String, String, URI, URI, URI)
.public static boolean removeModel(Model model) throws SBOLValidationException
This method calls SBOLDocument.removeModel(Model)
.
model
- the model to be removedtrue
if the given model was successfully removed, false
otherwiseSBOLValidationException
- if an SBOL validation rule violation occurred in SBOLDocument.removeModel(Model)
.public static Model getModel(String displayId, String version)
This method calls SBOLDocument.getModel(String, String)
with the given arguments.
displayId
- the display ID of the model to be retrievedversion
- the version of the model to be retrievednull
otherwisepublic static Model getModel(URI modelURI)
This method calls SBOLDocument.getModel(URI)
with the given argument.
modelURI
- the identity URI of the model to be retrievednull
otherwisepublic static Set<Model> getModels()
This method calls SBOLDocument.getModels()
.
public static void clearModels() throws SBOLValidationException
SBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.clearModels()
.public static ComponentDefinition createComponentDefinition(String displayId, Set<URI> types) throws SBOLValidationException
This method calls SBOLDocument.createComponentDefinition(String, Set)
with the given component definition display ID
and types.
displayId
- the display ID of the component definition to be createdtypes
- the types of the component definition to be createdSBOLValidationException
- if an SBOL validation rule was violated in SBOLDocument.createComponentDefinition(String, Set)
.public static ComponentDefinition createComponentDefinition(String displayId, URI type) throws SBOLValidationException
This method calls SBOLDocument.createComponentDefinition(String, URI)
with the given component definition display ID
and type.
displayId
- the display ID of the component definition to be createdtype
- the type to be added to the component definition to be createdSBOLValidationException
- if an SBOL validation rule was violated in SBOLDocument.createComponentDefinition(String, URI)
.public static ComponentDefinition createComponentDefinition(String displayId, String version, Set<URI> types) throws SBOLValidationException
This method calls SBOLDocument.createComponentDefinition(String, String, Set)
with the given component definition display ID,
version, and types.
displayId
- the display ID of the component definition to be createdversion
- the version of the component definition to be createdtypes
- the types of the component definition to be createdSBOLValidationException
- if an SBOL validation rule was violated in
SBOLDocument.createComponentDefinition(String, String, Set)
.public static ComponentDefinition createComponentDefinition(String displayId, String version, URI type) throws SBOLValidationException
This method calls SBOLDocument.createComponentDefinition(String, String, URI)
with the given component definition display ID,
version, and type.
displayId
- the display ID of the component definition to be createdversion
- the version of the component definition to be createdtype
- the type of the component definition to be createdSBOLValidationException
- if an SBOL validation rule was violated in
SBOLDocument.createComponentDefinition(String, String, URI)
.public static ComponentDefinition createComponentDefinition(String URIprefix, String displayId, String version, Set<URI> types) throws SBOLValidationException
This method calls SBOLDocument.createComponentDefinition(String, String, String, Set)
with the given URI prefix,
component definition display ID, version, and types.
URIprefix
- the URI prefix used to construct the compliant URI for the component definition to be createddisplayId
- the display ID of the component definition to be createdversion
- the version of the component definition to be createdtypes
- the types of the component definition to be createdSBOLValidationException
- if an SBOL validation rule was violated in
SBOLDocument.createComponentDefinition(String, String, String, Set)
.public static ComponentDefinition createComponentDefinition(String URIprefix, String displayId, String version, URI type) throws SBOLValidationException
This method calls SBOLDocument.createComponentDefinition(String, String, String, URI)
with the given URI prefix,
component definition display ID, version, and type.
URIprefix
- the URI prefix used to construct the compliant URI for the component definition to be createddisplayId
- the display ID of the component definition to be createdversion
- the version of the component definition to be createdtype
- the type of the component definition to be createdSBOLValidationException
- if an SBOL validation rule was violated in
SBOLDocument.createComponentDefinition(String, String, String, URI)
.public static boolean removeComponentDefinition(ComponentDefinition componentDefinition) throws SBOLValidationException
This method calls SBOLDocument.removeComponentDefinition(ComponentDefinition)
.
componentDefinition
- the component definition to be removedtrue
if the given component definition was successfully removed, false
otherwise.SBOLValidationException
- if an SBOL validation rule was violated in SBOLDocument.removeComponentDefinition(ComponentDefinition)
.public static ComponentDefinition getComponentDefinition(String displayId, String version)
This method calls SBOLDocument.getComponentDefinition(String, String)
with
the given arguments.
displayId
- the display ID of the component definition to be retrievedversion
- the version of the component definition to be retrievednull
otherwisepublic static ComponentDefinition getComponentDefinition(URI componentDefinitionURI)
This method calls SBOLDocument.getComponentDefinition(URI)
with
the given argument.
componentDefinitionURI
- the given identity URI of the component definition to be retrievednull
otherwise.public static Set<ComponentDefinition> getComponentDefinitions()
This method calls SBOLDocument.getComponentDefinitions()
.
public static Set<ComponentDefinition> getRootComponentDefinitions()
public static void clearComponentDefinitions() throws SBOLValidationException
SBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.clearComponentDefinitions()
.public static Sequence createSequence(String displayId, String elements, URI encoding) throws SBOLValidationException
This method calls SBOLDocument.createSequence(String, String, URI)
by passing the given
arguments.
displayId
- the display ID of the sequence to be createdelements
- the elements property of the sequence to be createdencoding
- the encoding property of the sequence to be createdSBOLValidationException
- if an SBOL validation rule was violated in
SBOLDocument.createSequence(String, String, URI)
.public static Sequence createSequence(String displayId, String version, String elements, URI encoding) throws SBOLValidationException
This method calls SBOLDocument.createSequence(String, String, String, URI)
by passing the given
arguments.
displayId
- the display ID of the sequence to be createdversion
- the version of the sequence to be createdelements
- the elements property of the sequence to be createdencoding
- the encoding property of the sequence to be createdSBOLValidationException
- if an SBOL validation rule was violated in
SBOLDocument.createSequence(String, String, String, URI)
.public static Sequence createSequence(String URIprefix, String displayId, String version, String elements, URI encoding) throws SBOLValidationException
This method calls SBOLDocument.createSequence(String, String, String, String, URI)
by passing the given
arguments.
URIprefix
- the URI prefix used to construct the compliant URI for the sequence to be createddisplayId
- the display ID of the sequence to be createdversion
- the version of the sequence to be createdelements
- the elements property of the sequence to be createdencoding
- the encoding property of the sequence to be createdSBOLValidationException
- if an SBOL validation rule was violated in
SBOLDocument.createSequence(String, String, String, String, URI)
.public static void createCopy(SBOLDocument document) throws SBOLValidationException
This method calls createCopy(TopLevel)
by passing each top-level in the given SBOL document.
document
- the document to be copied fromSBOLValidationException
- if an SBOL validation rule violation occurred in createCopy(TopLevel)
.public static TopLevel createCopy(TopLevel topLevel) throws SBOLValidationException
This method calls SBOLDocument.createCopy(TopLevel)
by passing the given top-level.
topLevel
- the given top-level to be copiedSBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.createCopy(TopLevel)
.public static TopLevel createCopy(TopLevel topLevel, String displayId) throws SBOLValidationException
This method calls SBOLDocument.createCopy(TopLevel, String)
by passing the given top-level
and the given display ID.
topLevel
- the top-level to be copied fromdisplayId
- the display ID of the created copySBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.createCopy(TopLevel, String)
.public static TopLevel createCopy(TopLevel topLevel, String displayId, String version) throws SBOLValidationException
This method calls SBOLDocument.createCopy(TopLevel, String, String)
by passing the given top-level,
display ID, and version.
topLevel
- the top-level to be copied fromdisplayId
- the display ID of the created copyversion
- the version of the created copySBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.createCopy(TopLevel, String, String)
.public static TopLevel createCopy(TopLevel topLevel, String URIprefix, String displayId, String version) throws SBOLValidationException
This method calls SBOLDocument.createCopy(TopLevel, String, String, String)
by passing the given top-level,
URI prefix, display ID, and version.
topLevel
- the top-level to be copied fromURIprefix
- the URI prefix of the created copydisplayId
- the display ID of the created copyversion
- the version of the created copySBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.createCopy(TopLevel, String, String, String)
.public static SBOLDocument createRecursiveCopy(TopLevel topLevel) throws SBOLValidationException
This method calls SBOLDocument.createRecursiveCopy(TopLevel)
by passing the given
top-level.
topLevel
- the top-level to be copiedSBOLValidationException
- if an SBOL validation rule was violated in
SBOLDocument.createRecursiveCopy(TopLevel)
.public static boolean removeSequence(Sequence sequence) throws SBOLValidationException
This method calls SBOLDocument.removeSequence(Sequence)
.
sequence
- the given sequence to be removedtrue
if the given sequence was successfully removed, false
otherwiseSBOLValidationException
- if an SBOL validation rule was violated in SBOLDocument.removeSequence(Sequence)
.public static Sequence getSequence(String displayId, String version)
This method calls SBOLDocument.getSequence(String, String)
with the given arguments.
displayId
- the display ID of the sequence to be retrievedversion
- the version of the sequence to be retrievednull
otherwise.public static Sequence getSequence(URI sequenceURI)
This method calls SBOLDocument.getSequence(URI)
with the given arguments.
sequenceURI
- the identity URI of the sequence to be retrievednull
otherwise.public static Set<Sequence> getSequences()
public static void clearSequences() throws SBOLValidationException
SBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.clearSequences()
.public static GenericTopLevel createGenericTopLevel(String displayId, QName rdfType) throws SBOLValidationException
This method calls SBOLDocument.createGenericTopLevel(String, QName)
with the given display ID and RDF type.
displayId
- the display ID of the generic top-level to be createdrdfType
- the type of the generic top-level to be createdSBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.createGenericTopLevel(String, QName)
.public static GenericTopLevel createGenericTopLevel(String displayId, String version, QName rdfType) throws SBOLValidationException
This method calls SBOLDocument.createGenericTopLevel(String, String, QName)
with the given display ID and RDF type.
displayId
- the display ID of the generic top-level to be createdversion
- the version of the generic top-level to be createdrdfType
- the type of the generic top-level to be createdSBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.createGenericTopLevel(String, String, QName)
.public static GenericTopLevel createGenericTopLevel(String URIprefix, String displayId, String version, QName rdfType) throws SBOLValidationException
This method calls SBOLDocument.createGenericTopLevel(String, String, String, QName)
with the given URI prefix,
display ID, version, and RDF type.
URIprefix
- the given URI prefix used to create a compliant URI for the generic top-level to be createddisplayId
- the display ID of the generic top-level to be createdversion
- the version of the generic top-level to be createdrdfType
- the type of the generic top-level to be createdSBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.createGenericTopLevel(String, String, String, QName)
.public static boolean removeGenericTopLevel(GenericTopLevel genericTopLevel) throws SBOLValidationException
This method calls SBOLDocument.removeGenericTopLevel(GenericTopLevel)
.
genericTopLevel
- the generic top-level to be removedtrue
if the given generic top-level was successfully removed, false
otherwise.SBOLValidationException
- if an SBOL validation rule violation occurred in SBOLDocument.removeGenericTopLevel(GenericTopLevel)
.public static GenericTopLevel getGenericTopLevel(String displayId, String version)
This method calls SBOLDocument.getGenericTopLevel(String, String)
with
the given arguments.
displayId
- the display ID of the generic top-level to be retrievedversion
- the version of the generic top-level to be retrievedpublic static GenericTopLevel getGenericTopLevel(URI topLevelURI)
This method calls SBOLDocument.getGenericTopLevel(URI)
with
the given argument.
topLevelURI
- the identity URI of the top-level to be retrievednull
otherwisepublic static Set<GenericTopLevel> getGenericTopLevels()
This method calls SBOLDocument.getGenericTopLevels()
.
public static void clearGenericTopLevels() throws SBOLValidationException
SBOLValidationException
- if an SBOL validation rule violation occurred in
SBOLDocument.clearGenericTopLevels()
.public static TopLevel getTopLevel(URI topLevelURI)
This method calls SBOLDocument.getTopLevel(URI)
with the given argument.
topLevelURI
- the identity URI of the sequence to be retrievednull
otherwisepublic static Set<TopLevel> getTopLevels()
public static Set<TopLevel> getByWasDerivedFrom(URI wasDerivedFrom)
This method calls SBOLDocument.getByWasDerivedFrom(URI)
by passing the given argument.
wasDerivedFrom
- the wasDerivedFrom field of which all matching top-levels to be retrievedpublic static void addNamespace(URI namespaceURI, String prefix) throws SBOLValidationException
This method calls SBOLDocument.addNamespace(URI, String)
with the given
namespace URI and prefix.
namespaceURI
- the URI used to construct a new namespaceprefix
- the prefix used to construct a new namespaceSBOLValidationException
- if namespace URI does not end with a delimeterpublic static void addNamespace(QName qName) throws SBOLValidationException
This method calls SBOLDocument.addNamespace(QName)
with the given QName.
qName
- the QName to be addedSBOLValidationException
- if namespace URI does not end with a delimeterpublic static void clearNamespaces()
public static QName getNamespace(URI namespaceURI)
namespaceURI
- the identity URI of the namespace to be retrievednull
otherwisepublic static List<QName> getNamespaces()
public static void removeNamespace(URI namespaceURI)
This method calls SBOLDocument.removeNamespace(URI)
.
namespaceURI
- the namespace URI to be removedpublic static void setDefaultURIprefix(String defaultURIprefix)
This method calls SBOLDocument.setDefaultURIprefix(String)
.
defaultURIprefix
- the given default URI prefixpublic static String getDefaultURIprefix()
This method calls SBOLDocument.getDefaultURIprefix()
.
public static boolean isComplete()
A true
value means that all identity URI references should be able
to dereference to instances in the this document, and a false value means otherwise.
This method calls SBOLDocument.isComplete()
.
public static void setComplete(boolean complete)
A true
value indicates that the factory's internal SBOL document is complete:
any identity URIs should be able to dereference to an instance in this document.
This method calls SBOLDocument.setComplete(boolean)
.
complete
- the given boolean value for the complete flagpublic static boolean isCompliant()
A true
value means that all URIs in the factory's internal SBOL document are compliant,
and a false
value means otherwise.
This method calls SBOLDocument.isCompliant()
.
public static boolean isTypesInURIs()
A true
value means that types will be inserted into this document's each top-level's compliant URI when it is created,
and a false
value means otherwise.
This method calls SBOLDocument.isTypesInURIs()
.
public static void setTypesInURIs(boolean typesInURIs)
A true
value means that types are inserted into top-level
identity URIs when they are created.
This method calls SBOLDocument.setTypesInURIs(boolean)
.
typesInURIs
- the given boolean value for the typesInURIs flagpublic static boolean isCreateDefaults()
true
value means that default components and/or functional components instances should be created
when not present in the factory's internal SBOL document, and a false
value means otherwise.
This method calls SBOLDocument.isCreateDefaults()
.true
if default component instances should be created when not present,
false
otherwisepublic static void setCreateDefaults(boolean createDefaults)
A true
value means that default component instances should be created when not present.
This method calls SBOLDocument.setCreateDefaults(boolean)
.
createDefaults
- the given boolean value for the createDefaults flagpublic static void read(String fileName) throws SBOLValidationException, IOException, SBOLConversionException
fileName
- a given RDF file nameSBOLValidationException
- if an SBOL validation rule violation occurred in SBOLDocument.read(String)
.SBOLConversionException
- see SBOLConversionException
IOException
- see IOException
public static void read(File file) throws SBOLValidationException, IOException, SBOLConversionException
This method calls SBOLDocument.read(File)
.
file
- a given RDF fileSBOLValidationException
- if an SBOL validation rule violation occurred in SBOLDocument.read(File)
.SBOLConversionException
- see SBOLConversionException
IOException
- see IOException
public static void read(InputStream in) throws SBOLValidationException, IOException, SBOLConversionException
This method calls SBOLDocument.read(InputStream)
.
in
- a given RDF input streamSBOLValidationException
- if an SBOL validation rule violation occurred in SBOLDocument.read(InputStream)
.SBOLConversionException
- see SBOLConversionException
IOException
- see IOException
public static void write(String filename) throws IOException, SBOLConversionException
This method calls SBOLDocument.write(String)
.
filename
- the given output file nameIOException
- see IOException
SBOLConversionException
- see SBOLDocument.write(String)
.public static void write(String filename, String fileType) throws IOException, SBOLConversionException
This method calls SBOLDocument.write(File, String)
.
filename
- the given output file namefileType
- the given serialization formatIOException
- see IOException
SBOLConversionException
- SBOLDocument.write(File, String)
.public static void write(File file) throws IOException, SBOLConversionException
SBOLDocument.write(File)
.file
- the given output fileIOException
- see IOException
SBOLConversionException
- see SBOLDocument.write(File)
public static void write(File file, String fileType) throws IOException, SBOLConversionException
This method calls SBOLDocument.write(File, String)
.
file
- the given output filefileType
- the given serialization formatIOException
- see IOException
SBOLConversionException
- see SBOLDocument.write(File, String)
.public static void write(OutputStream out) throws SBOLConversionException
This method calls SBOLDocument.write(OutputStream)
.
out
- the given output streamSBOLConversionException
- see SBOLDocument.write(OutputStream)
.public static void write(OutputStream out, String fileType) throws SBOLConversionException, IOException
This method calls SBOLDocument.write(OutputStream, String)
.
out
- the given output streamfileType
- the serialization formatSBOLConversionException
- see SBOLDocument.write(OutputStream, String)
.IOException
- see IOException
Copyright © 2017. All rights reserved.