public class SynBioHubFrontend extends Object
Constructor and Description |
---|
SynBioHubFrontend(String backendUrl)
Creates an instance of the SynBioHub API.
|
SynBioHubFrontend(String backendUrl,
String uriPrefix)
Creates an instance of the SynBioHub API.
|
Modifier and Type | Method and Description |
---|---|
String |
getBackendUrl()
Returns the URL for the SynBioHub instance.
|
int |
getCount(String objectType)
Return the total number of objects of a specified type in the repository.
|
ArrayList<IdentifiedMetadata> |
getMatchingComponentDefinitionMetadata(String name,
Set<URI> roles,
Set<URI> types,
Set<URI> collections,
Integer offset,
Integer limit)
Search the default store for ComponentDefinition instances matching a name and/or a set of roles
|
ArrayList<IdentifiedMetadata> |
getRootCollectionMetadata()
Search the default store for Collections that are not members of any other Collections
|
SBOLDocument |
getSBOL(URI topLevelUri)
Retrieve SBOL TopLevel object from a SynBioHub instance using its URI.
|
ArrayList<IdentifiedMetadata> |
getSubCollectionMetadata(URI parentCollectionUri)
Search the default store for Collections that are members of the specified Collection
|
void |
login(String email,
String password)
Login to the SynBioHub.
|
void |
logout()
Sets the user to null to indicate that no user is logged in.
|
void |
removeRegistryParts(SBOLDocument document)
Remove all parts from this registry from a given SBOL document
|
void |
removeSBOL(URI topLevelUri)
Remove SBOL TopLevel object from a SynBioHub instance using its URI.
|
ArrayList<IdentifiedMetadata> |
search(SearchQuery query)
Search this SynBioHub instance for objects matching a search query
|
void |
submit(String id,
String version,
String name,
String description,
String citations,
String collections,
String overwrite_merge,
SBOLDocument document)
Submit to the SynBioHub.
|
public SynBioHubFrontend(String backendUrl, String uriPrefix)
backendUrl
- - URL for the SynBioHub instance.uriPrefix
- - prefix for all URIs stored in this repositorypublic SynBioHubFrontend(String backendUrl)
backendUrl
- - URL for the SynBioHub instance.public String getBackendUrl()
public int getCount(String objectType) throws SynBioHubException
objectType
- The object type to count
(Collection, ComponentDefinition, Sequence, ModuleDefinition, Model, etc.).SynBioHubException
- if there was an error communicating with the SynBioHubpublic SBOLDocument getSBOL(URI topLevelUri) throws SynBioHubException
topLevelUri
- The URI of the SBOL TopLevelSynBioHubException
- if there was an error communicating with the SynBioHubpublic void removeSBOL(URI topLevelUri) throws SynBioHubException
topLevelUri
- The URI of the SBOL TopLevelSynBioHubException
- if there was an error communicating with the SynBioHubpublic ArrayList<IdentifiedMetadata> getMatchingComponentDefinitionMetadata(String name, Set<URI> roles, Set<URI> types, Set<URI> collections, Integer offset, Integer limit) throws SynBioHubException
name
- The dcterms:title to search for, or nullroles
- A set of role URIs to search for, or nulltypes
- A set of type URIs to search for, or nullcollections
- A set of Collection URIs to search for, or nulloffset
- The offset of the results to begin at, or null to begin at 0limit
- The maximum number of results to return, or null to return all resultsSynBioHubException
- if there was an error communicating with the SynBioHubpublic ArrayList<IdentifiedMetadata> search(SearchQuery query) throws SynBioHubException
query
- the search querySynBioHubException
- if there was an error communicating with the SynBioHubpublic ArrayList<IdentifiedMetadata> getRootCollectionMetadata() throws SynBioHubException
SynBioHubException
- if there was an error communicating with the SynBioHubpublic ArrayList<IdentifiedMetadata> getSubCollectionMetadata(URI parentCollectionUri) throws SynBioHubException
parentCollectionUri
- URI for Collection to search for member CollectionsSynBioHubException
- if there was an error communicating with the SynBioHubpublic void logout()
public void login(String email, String password) throws SynBioHubException
email
- The user's emailpassword
- The user's passwordSynBioHubException
- if there was an error communicating with the SynBioHubpublic void removeRegistryParts(SBOLDocument document)
document
- The document to remove all registry parts frompublic void submit(String id, String version, String name, String description, String citations, String collections, String overwrite_merge, SBOLDocument document) throws SynBioHubException
id
- The submission identifierversion
- The submission versionname
- The submission namedescription
- The submission descriptioncitations
- The pubMedIds for this submissioncollections
- A comma separated list of keywordsoverwrite_merge
- '0' prevent, '1' overwrite, '2' mergedocument
- the SBOL document to submitSynBioHubException
- if there was an error communicating with the SynBioHubCopyright © 2017. All rights reserved.