Class URLIdentifier

  • All Implemented Interfaces:
    java.io.Serializable, StructureIdentifier

    public class URLIdentifier
    extends java.lang.Object
    implements StructureIdentifier
    Represents a structure loaded from a URL (including a file URL) A few custom query parameters are supported:
    • format=[pdb|cif] Specify the file format (will otherwise be guessed from the extension)
    • pdbId=[String] Specify the PDB ID (also guessed from the filename)
    • chainID=[String] A single chain from the structure
    • residues=[String] Residue ranges, in a form understood by SubstructureIdentifier
    Author:
    Spencer Bliven
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CHAINID_PARAM
      URL parameter specifying a single chain to include; overridden by residues
      static java.lang.String FORMAT_PARAM
      URL parameter specifying the file format (PDB or CIF)
      static java.lang.String PDBID_PARAM
      URL parameter specifying the PDB ID
      static java.lang.String RESIDUES_PARAM
      URL parameter specifying residue ranges to include, e.g.
    • Constructor Summary

      Constructors 
      Constructor Description
      URLIdentifier​(java.lang.String url)  
      URLIdentifier​(java.net.URL url)  
    • Field Detail

      • FORMAT_PARAM

        public static final java.lang.String FORMAT_PARAM
        URL parameter specifying the file format (PDB or CIF)
        See Also:
        Constant Field Values
      • PDBID_PARAM

        public static final java.lang.String PDBID_PARAM
        URL parameter specifying the PDB ID
        See Also:
        Constant Field Values
      • CHAINID_PARAM

        public static final java.lang.String CHAINID_PARAM
        URL parameter specifying a single chain to include; overridden by residues
        See Also:
        Constant Field Values
    • Constructor Detail

      • URLIdentifier

        public URLIdentifier​(java.net.URL url)
      • URLIdentifier

        public URLIdentifier​(java.lang.String url)
                      throws java.net.MalformedURLException
        Throws:
        java.net.MalformedURLException
    • Method Detail

      • getURL

        public java.net.URL getURL()
      • getIdentifier

        public java.lang.String getIdentifier()
        Description copied from interface: StructureIdentifier
        Get the String form of this identifier. It is recommended that the #toString() method also return the identifier, for consistency during serialization.
        Specified by:
        getIdentifier in interface StructureIdentifier
        Returns:
        The String form of this identifier
      • toCanonical

        public SubstructureIdentifier toCanonical()
        Description copied from interface: StructureIdentifier
        Convert to a canonical SubstructureIdentifier.

        This allows all domains to be converted to a standard format String.

        Specified by:
        toCanonical in interface StructureIdentifier
        Returns:
        A SubstructureIdentifier without ranges (e.g. including all residues)
      • guessPDBID

        public static java.lang.String guessPDBID​(java.lang.String name)
        Recognizes PDB IDs that occur at the beginning of name followed by some delimiter.
        Parameters:
        name - Input filename
        Returns:
        A 4-character id-like string, or null if none is found