Package tethys.dbxml

Class DBXMLQueries

java.lang.Object
tethys.dbxml.DBXMLQueries

public class DBXMLQueries extends Object
Some standard queries we're going to want to make from various parts of the system as the user interacts with the GUI.
Author:
dg50
  • Constructor Details Link icon

  • Method Details Link icon

    • executeQuery Link icon

      public DBQueryResult executeQuery(String jsonQueryString) throws TethysQueryException
      Execute a DBXML query. Returns an object which included the time taken to execute the query and either a returned Document or an Exception. Or will return null if the server is not connected
      Parameters:
      jsonQueryString -
      Returns:
      query result
      Throws:
      TethysQueryException
    • getCollectionDocumentList Link icon

      public ArrayList<DocumentInfo> getCollectionDocumentList(Collection collection)
      Get a list of all documents in a collection.
      Parameters:
      collection -
      Returns:
      list of all documents in a collection, or null if no collection.
    • getProjectNames Link icon

      public ArrayList<String> getProjectNames()
      Get a list of project names.
      Returns:
    • getProjectDeployments Link icon

      public ArrayList<nilus.Deployment> getProjectDeployments(String projectName, String instrumentId)
      Get project deployments that use a specific instrument id. More use than the call without this extra clause since it can handle overlapping deployments.
      Parameters:
      projectName -
      instrumentId -
      Returns:
    • getProjectDeployments Link icon

      public ArrayList<nilus.Deployment> getProjectDeployments(String projectName)
      Get some basic (not all) data for deployments associated with a project. Note that this may include deployments which are NOT part of the current dataset. That requires a search on Instrument as well.
      Parameters:
      projectName -
      Returns:
    • getDetectionsDocuments Link icon

      public ArrayList<String> getDetectionsDocuments(PamDataBlock dataBlock, String deploymentId)
      Get a list of Detections documents which associate with a datablock and a deploymentId.
      Parameters:
      dataBlock -
      deploymentId - can be null to get all docs for data block
      Returns:
    • getLocalizationDocuments Link icon

      public ArrayList<String> getLocalizationDocuments(PamDataBlock dataBlock, String deploymentId)
      Get a list of Localization documents which associate with a datablock and a deploymentId.
      Parameters:
      dataBlock -
      deploymentId - can be null to get all docs for data block
      Returns:
    • getDeploymentDocuments Link icon

      public ArrayList<String> getDeploymentDocuments(Collection collection, String deploymentId)
      Get the names of all the detection or localisation documents for a given deployment id.
      Parameters:
      collection - Localizations or Detetections
      deploymentId - Deployment document id.
      Returns:
    • getDetectionsDocuments Link icon

      public ArrayList<String> getDetectionsDocuments(String deploymentId)
      Get the names of all detection documents for a given deployment for all data streams.
      Parameters:
      deploymentId -
      Returns:
    • getLocalizationsDocuments Link icon

      public ArrayList<String> getLocalizationsDocuments(String deploymentId)
      Get the names of all localisation documents for a given deployment for all data streams.
      Parameters:
      deploymentId -
      Returns:
    • countData Link icon

      public int countData(PamDataBlock dataBlock, String deploymentId)
    • getDocument Link icon

      public String getDocument(String collection, String documentId)
    • documentExists Link icon

      public boolean documentExists(String collection, String documentId)
      Find out if a document exists ?
      Parameters:
      collection -
      documentId -
      Returns:
    • countDetections2 Link icon

      public int countDetections2(String docName)
      Count on effort detections in a Detections document
      Parameters:
      docName -
      Returns:
    • countLocalizations2 Link icon

      public int countLocalizations2(String docName)
      Count on effort detections in a Detections document
      Parameters:
      docName -
      Returns:
    • getElementData Link icon

      public String getElementData(Element root, String elName)
    • getElementAttribute Link icon

      public String getElementAttribute(Element root, String elName, String attribute)
    • convertStringToXMLDocument Link icon

      public Document convertStringToXMLDocument(String xmlString)
    • getDetectionsDocInfo Link icon

      public nilus.Detections getDetectionsDocInfo(String detectionsDocName)
      Get the basic information about a Detections document. This is basically everything apart from the actual detections themselves.
      Parameters:
      aDoc -
      Returns:
    • getLocalizationDocInfo Link icon

      public nilus.Localize getLocalizationDocInfo(String locDocName)
      Get the basic information about a Detections document. This is basically everything apart from the actual detections themselves.
      Parameters:
      aDoc -
      Returns: