Documentation of 'edu.wisc.ssec.mcidas.adde.AddeURL' Java class
AddeURL
edu.wisc.ssec.mcidas.adde

Class AddeURL

  • All Implemented Interfaces:
    java.lang.Cloneable
    Direct Known Subclasses:
    AddeDatasetURL


    public class AddeURL
    extends java.lang.Object
    implements java.lang.Cloneable
    A class for holding information about an ADDE URL.
    
     URLs must all have the following format:
    
       adde://host/request?keyword_1=value_1&keyword_2=value_2
    
     where request can be one of the following:
    
       datasetinfo - request for data set information (LWPR)
       griddirectory - request for grid directory information (GDIR)
       griddata - request for grid data (GGET)
       imagedata - request for data in AreaFile format (AGET)
       imagedirectory - request for image directory information (ADIR)
       pointdata - request for point data (MDKS)
       textdata - request to read a text file (TXTG)
       wxtext   - request to read a weather text file (WTXG)
       obtext   - request to read a observation text file (OBTG)
    
     There can be any valid combination of the following supported keywords:
    
     -------for any request
    
       group=<groupname>         ADDE group name
       user=<user_id>            ADDE user identification
       proj=<proj #>             a valid ADDE project number
       trace=<0/1>               setting to 1 tells server to write debug
                                   trace file
       version=                  ADDE version number, currently 1 except for
                                 griddata requests
       debug=                    set to true to watch the printlns stream by
       compress=                 set to "gzip" if you want to use the GZIP
                                 compression or "compress" if you want to use
                                 transfers in Unix compress format (You need to
                                 have the VisAD package if you want to support
                                 this.)  default = none.
       port=                     Socket port to connect on.  Overridden by
                                 a port specified in the host
                                 (e.g., adde.ucar.edu:500)
    
     
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String ADDE_PROTOCOL
      The protocol
      static java.lang.String ALL
      Value for ALL
      static int COMPRESS
      Flag for "compress" compression.
      static java.lang.String DEFAULT_VALUE
      Default value for key/value pairs (X)
      static int GZIP
      Flag for GZip compression.
      static java.lang.String KEY_COMPRESS
      Keyword for compress
      static java.lang.String KEY_DEBUG
      Keyword for debug
      static java.lang.String KEY_PORT
      Keyword for port
      static java.lang.String KEY_PROJ
      Keyword for project
      static java.lang.String KEY_TRACE
      Keyword for trace
      static java.lang.String KEY_USER
      Keyword for user
      static java.lang.String KEY_VERSION
      Keyword for version
      static java.lang.String NO
      Value for no
      static int NO_COMPRESS
      Flag for "no compress" compression.
      static java.lang.String REQ_ADIR
      ADIR request type
      static java.lang.String REQ_AGET
      AGET request type
      static java.lang.String REQ_DATASETINFO
      Data set info request type
      static java.lang.String REQ_GDIR
      GDIR request type
      static java.lang.String REQ_GGET
      GGET request type
      static java.lang.String REQ_GRIDDATA
      Grid data request type
      static java.lang.String REQ_GRIDDIR
      Grid directory request type
      static java.lang.String REQ_IMAGEDATA
      Image data request type
      static java.lang.String REQ_IMAGEDIR
      Image directory request type
      static java.lang.String REQ_LWPR
      LWPR request type
      static java.lang.String REQ_MDKS
      MDKS request type
      static java.lang.String REQ_OBTEXT
      obs text request type
      static java.lang.String REQ_OBTG
      OBTG request type
      static java.lang.String REQ_POINTDATA
      Point data request type
      static java.lang.String REQ_TEXT
      Text request type
      static java.lang.String REQ_TXTG
      TXTG request type
      static java.lang.String REQ_WTXG
      WTXG request type
      static java.lang.String REQ_WXTEXT
      weather text request type
      static int TRACE_OFF
      flag for trace off
      static int TRACE_ON
      flag for trace on
      static java.lang.String YES
      Value for yes
    • Constructor Summary

      Constructors 
      Constructor and Description
      AddeURL()
      Create an ADDE URL
      AddeURL(java.lang.String host, java.lang.String requestType)
      Create an ADDE URL from the given spec
      AddeURL(java.lang.String host, java.lang.String requestType, java.lang.String extraKeys)
      Create an ADDE URL from the given spec
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object clone()
      Clones this instance.
      boolean equals(java.lang.Object o)
      Compare two AddeURLs
      int getCompression()
      Get the compression type for this ADDE URL
      boolean getDebug()
      Get the debug value for this ADDE URL
      java.lang.String getExtraKeys()
      Get the extraKeys string for this ADDE URL
      java.lang.String getHost()
      Get the host for this ADDE URL
      int getPort()
      Get the port for this ADDE URL
      int getProject()
      Get the project for this ADDE URL
      java.lang.String getRequestType()
      Get the request type for this ADDE URL
      int getTrace()
      Get the trace value used for this ADDE URL
      java.lang.String getURLString()
      Create the ADDE URL as a String
      java.lang.String getUser()
      Get the project for this ADDE URL
      java.lang.String getValue(java.lang.String query, java.lang.String key)
      Get the value for a particular key.
      java.lang.String getVersion()
      Get the version for this ADDE URL
      int hashCode()
      Get the hashcode for this
      void setCompression(int compress)
      Set the compression type used for this ADDE URL
      void setCompressionFromString(java.lang.String type)
      Set the compression type from a string
      void setDebug(boolean debug)
      Set the debug value this ADDE URL
      void setExtraKeys(java.lang.String extraKeys)
      Set the extraKeys string for this ADDE URL
      void setHost(java.lang.String host)
      Set the host for this ADDE URL
      void setPort(int port)
      Set the port used for this ADDE URL
      void setProject(int project)
      Set the project for this ADDE URL
      void setRequestType(java.lang.String requestType)
      Set the request type for this ADDE URL
      void setTrace(int trace)
      Set the trace value used for this ADDE URL
      void setUser(java.lang.String user)
      Set the user for this ADDE URL
      void setVersion(java.lang.String version)
      Set the version this ADDE URL
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AddeURL

        public AddeURL()
        Create an ADDE URL
      • AddeURL

        public AddeURL(java.lang.String host,
                       java.lang.String requestType)
        Create an ADDE URL from the given spec
        Parameters:
        host - host to send to
        requestType - type of request (REQ_*)
      • AddeURL

        public AddeURL(java.lang.String host,
                       java.lang.String requestType,
                       java.lang.String extraKeys)
        Create an ADDE URL from the given spec
        Parameters:
        host - host to send to
        requestType - type of request (REQ_*)
        extraKeys - extra key/value arguments
    • Method Detail

      • getURLString

        public java.lang.String getURLString()
        Create the ADDE URL as a String
        Returns:
        an Adde URL
      • getValue

        public java.lang.String getValue(java.lang.String query,
                                         java.lang.String key)
        Get the value for a particular key.
        Parameters:
        query - the query string
        key - the key to search
        Returns:
        the value or null if it doesn't exist
      • equals

        public boolean equals(java.lang.Object o)
        Compare two AddeURLs
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - Object in question
        Returns:
        true if they are the same object or if all
      • hashCode

        public int hashCode()
        Get the hashcode for this
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hashcode
      • getHost

        public java.lang.String getHost()
        Get the host for this ADDE URL
        Returns:
        the host
      • setHost

        public void setHost(java.lang.String host)
        Set the host for this ADDE URL
        Parameters:
        host - the host
      • getRequestType

        public java.lang.String getRequestType()
        Get the request type for this ADDE URL
        Returns:
        the host
      • setRequestType

        public void setRequestType(java.lang.String requestType)
        Set the request type for this ADDE URL
        Parameters:
        requestType - the request Type
      • getExtraKeys

        public java.lang.String getExtraKeys()
        Get the extraKeys string for this ADDE URL
        Returns:
        the extraKeys string
      • setExtraKeys

        public void setExtraKeys(java.lang.String extraKeys)
        Set the extraKeys string for this ADDE URL
        Parameters:
        extraKeys - the extraKeys
      • getUser

        public java.lang.String getUser()
        Get the project for this ADDE URL
        Returns:
        the project
      • setUser

        public void setUser(java.lang.String user)
        Set the user for this ADDE URL
        Parameters:
        user - the user
      • getProject

        public int getProject()
        Get the project for this ADDE URL
        Returns:
        the project
      • setProject

        public void setProject(int project)
        Set the project for this ADDE URL
        Parameters:
        project - the project
      • getVersion

        public java.lang.String getVersion()
        Get the version for this ADDE URL
        Returns:
        the version
      • setVersion

        public void setVersion(java.lang.String version)
        Set the version this ADDE URL
        Parameters:
        version - the version
      • getDebug

        public boolean getDebug()
        Get the debug value for this ADDE URL
        Returns:
        the debug value (true or false)
      • setDebug

        public void setDebug(boolean debug)
        Set the debug value this ADDE URL
        Parameters:
        debug - the debug value (true or false);
      • getPort

        public int getPort()
        Get the port for this ADDE URL
        Returns:
        the port
      • setPort

        public void setPort(int port)
        Set the port used for this ADDE URL
        Parameters:
        port - the port
      • getCompression

        public int getCompression()
        Get the compression type for this ADDE URL
        Returns:
        the compression type
      • setCompression

        public void setCompression(int compress)
        Set the compression type used for this ADDE URL
        Parameters:
        compress - the compression type (GZIP, NO_COMPRESS, COMPRESS)
      • getTrace

        public int getTrace()
        Get the trace value used for this ADDE URL
        Returns:
        the trace value (TRACE_ON, TRACE_OFF)
      • setTrace

        public void setTrace(int trace)
        Set the trace value used for this ADDE URL
        Parameters:
        trace - the trace value (TRACE_ON, TRACE_OFF)
      • setCompressionFromString

        public void setCompressionFromString(java.lang.String type)
        Set the compression type from a string
        Parameters:
        type - the string type
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Clones this instance.

        This implementation never throws CloneNotSupportException

        Overrides:
        clone in class java.lang.Object
        Returns:
        A clone of this instance.
        Throws:
        java.lang.CloneNotSupportedException - if cloning isn't supported.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.