Class PDBStatus


  • public class PDBStatus
    extends java.lang.Object
    Methods for getting the status of a PDB file (current, removed, unreleased) and for accessing different versions of the structure.

    All methods query the RCSB Data REST API

    Since:
    3.0.2
    Author:
    Spencer Bliven, Amr ALHOSSARY, Jose Duarte
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  PDBStatus.Status
      Represents a simplified 3 state status of PDB IDs.
    • Constructor Summary

      Constructors 
      Constructor Description
      PDBStatus()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getCurrent​(java.lang.String oldPdbId)
      Gets the current version of a PDB ID.
      static java.util.SortedSet<java.lang.String> getCurrentPDBIds()
      Returns all current PDB IDs
      static PDBStatus.Status getStatus​(java.lang.String pdbId)
      Get the status of a PDB id.
      static PDBStatus.Status[] getStatus​(java.lang.String[] pdbIds)
      Get the status of a collection of PDB ids (in a single API query).
      static void main​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_RCSB_DATA_API_SERVER

        public static final java.lang.String DEFAULT_RCSB_DATA_API_SERVER
        See Also:
        Constant Field Values
      • ALL_CURRENT_ENDPOINT

        public static final java.lang.String ALL_CURRENT_ENDPOINT
        See Also:
        Constant Field Values
      • STATUS_LIST_ENDPOINT

        public static final java.lang.String STATUS_LIST_ENDPOINT
        See Also:
        Constant Field Values
    • Constructor Detail

      • PDBStatus

        public PDBStatus()
    • Method Detail

      • getStatus

        public static PDBStatus.Status getStatus​(java.lang.String pdbId)
                                          throws java.io.IOException
        Get the status of a PDB id.
        Parameters:
        pdbId - the id
        Returns:
        The status.
        Throws:
        java.io.IOException
      • getStatus

        public static PDBStatus.Status[] getStatus​(java.lang.String[] pdbIds)
                                            throws java.io.IOException
        Get the status of a collection of PDB ids (in a single API query).
        Parameters:
        pdbIds - the ids
        Returns:
        The status array
        Throws:
        java.io.IOException
        See Also:
        getStatus(String)
      • getCurrent

        public static java.lang.String getCurrent​(java.lang.String oldPdbId)
                                           throws java.io.IOException
        Gets the current version of a PDB ID.
        Parameters:
        oldPdbId - the id
        Returns:
        The replacement for oldPdbId, or null if none are found. If entry is current then the input PDB id is returned
        Throws:
        java.io.IOException
      • getCurrentPDBIds

        public static java.util.SortedSet<java.lang.String> getCurrentPDBIds()
                                                                      throws java.io.IOException
        Returns all current PDB IDs
        Returns:
        a list of PDB IDs
        Throws:
        java.io.IOException - if a problem occurs retrieving the information
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception