use of org.synbiohub.frontend.SynBioHubException in project libSBOLj by SynBioDex.
the class SBOLDocument method getExperiment.
/**
* Returns the experiment matching the given identity URI from this SBOL
* document's list of experiments.
*
* @param experimentURI
* the given identity URI of the experiment to be retrieved
* @return the matching experiment if present, or {@code null} otherwise
*/
public Experiment getExperiment(URI experimentURI) {
Experiment experiment = experiments.get(experimentURI);
if (experiment == null) {
for (SynBioHubFrontend frontend : getRegistries()) {
try {
SBOLDocument document = frontend.getSBOL(experimentURI);
if (document != null) {
experiment = document.getExperiment(experimentURI);
createCopy(document);
}
} catch (SynBioHubException | SBOLValidationException e) {
experiment = null;
}
}
}
return experiment;
}
use of org.synbiohub.frontend.SynBioHubException in project libSBOLj by SynBioDex.
the class SBOLDocument method getActivity.
/**
* Returns the activity matching the given display identity URI from this SBOL
* document's list of activities.
*
* @param activityURI
* the identity URI of the top-level to be retrieved
* @return the matching activity if present, or {@code null} otherwise.
*/
public Activity getActivity(URI activityURI) {
Activity activity = activities.get(activityURI);
if (activity == null) {
for (SynBioHubFrontend frontend : getRegistries()) {
try {
SBOLDocument document = frontend.getSBOL(activityURI);
if (document != null) {
activity = document.getActivity(activityURI);
createCopy(document);
}
} catch (SynBioHubException | SBOLValidationException e) {
activity = null;
}
}
}
return activity;
}
use of org.synbiohub.frontend.SynBioHubException in project libSBOLj by SynBioDex.
the class SBOLDocument method getComponentDefinition.
/**
* Returns the component definition matching the given identity URI from this
* SBOL document's list of component definitions.
*
* @param componentDefinitionURI
* the given identity URI of the component definition to be retrieved
* @return the matching component definition if present, or {@code null}
* otherwise.
*/
public ComponentDefinition getComponentDefinition(URI componentDefinitionURI) {
ComponentDefinition componentDefinition = componentDefinitions.get(componentDefinitionURI);
if (componentDefinition == null) {
for (SynBioHubFrontend frontend : getRegistries()) {
try {
SBOLDocument document = frontend.getSBOL(componentDefinitionURI);
if (document != null) {
componentDefinition = document.getComponentDefinition(componentDefinitionURI);
createCopy(document);
}
} catch (SynBioHubException | SBOLValidationException e) {
}
}
}
return componentDefinition;
}
use of org.synbiohub.frontend.SynBioHubException in project libSBOLj by SynBioDex.
the class SBOLDocument method getCollection.
/**
* Returns the collection matching the given identity URI from this SBOL
* document's list of collections.
*
* @param collectionURI
* the given identity URI of the collection to be retrieved
* @return the matching collection if present, or {@code null} otherwise
*/
public Collection getCollection(URI collectionURI) {
Collection collection = collections.get(collectionURI);
if (collection == null) {
for (SynBioHubFrontend frontend : getRegistries()) {
try {
SBOLDocument document = frontend.getSBOL(collectionURI);
if (document != null) {
collection = document.getCollection(collectionURI);
createCopy(document);
}
} catch (SynBioHubException | SBOLValidationException e) {
collection = null;
}
}
}
return collection;
}
use of org.synbiohub.frontend.SynBioHubException in project libSBOLj by SynBioDex.
the class SBOLDocument method getTopLevel.
/**
* Returns the top-level matching the given identity URI from this SBOL
* document's lists of top-levels.
*
* @param topLevelURI
* the identity URI of the top-level to be retrieved
* @return the matching top-level if present, or {@code null} otherwise.
*/
public TopLevel getTopLevel(URI topLevelURI) {
TopLevel topLevel = getTopLevelLocalOnly(topLevelURI);
if (topLevel == null) {
for (SynBioHubFrontend frontend : getRegistries()) {
try {
SBOLDocument document = frontend.getSBOL(topLevelURI);
if (document != null) {
topLevel = document.getTopLevel(topLevelURI);
createCopy(document);
}
} catch (SynBioHubException | SBOLValidationException e) {
}
}
}
return topLevel;
}
Aggregations