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

Class AddeTextReader



  • public class AddeTextReader
    extends java.lang.Object
    Read text from an ADDE server interface for McIDAS ADDE data sets. This class handles file, weather text and obs text requests.

     For File Reading:
       URLs must all have the following format   
         adde://host/text?file=filename.ext
    
       there can be any valid combination of the following supported keywords:
    
         file - name of text file on ADDE server
    
       the following keywords are required:
    
         file
    
       an example URL might look like:
         adde://viper/text?file=filename.ext
    
     For Weather Text Reading:
       URLs must all have the following format   
         adde://host/wxtext?group=group&key1=value1&key2=val2....&keyn=valn
    
       there can be any valid combination of the following supported keywords:
    
         group=<group>         weather text group (default= RTWXTEXT)
         prod=<product>        predefind product name
         apro=<val1 .. valn>   AFOS/AWIPS product headers to match (don't 
                               use with wmo keyword
         astn=<val1 .. valn>   AFOS/AWIPS stations to match
         wmo= <val1 .. valn>   WMO product headers to match (don't 
                               use with apro keyword
         wstn=<val1 .. valn>   WMO stations to match
         day=<start end>       range of days to search
         dtime=<numhours>      maximum number of hours to search back (def=96)
         match=<match strings> list of character match strings to find from text
         num=<num>             number of matches to find (def=1)
    
       the following keywords are required:
    
         day  (bug causes it not to default to current day)
         one of the selection criteria
    
       an example URL might look like:
         adde://adde.ucar.edu/wxtext?group=rtwxtext&prod=zone_fcst&astn=bou
    
     For Observational Text Reading:
       URLs must all have the following format   
         adde://host/obtext?group=group&descr=descr&key1=value1....&keyn=valn
    
       there can be any valid combination of the following supported keywords:
    
         group=<group>         weather text group (default= RTWXTEXT)
         descr=<descriptor>    weather text subgroup (default=SFCHOURLY)
         id=<id1 id2 ... idn>  list of station ids
         co=<co1 co2 ... con>  list of countries
         reg=<reg1 reg2..regn> list of regions
         newest=<day hour>     most recent time to allow in request 
                               (def=current time)
         oldest=<day hour>     oldest observation time to allow in request
         type=<type>           numeric value for the type of ob
         nhours=<numhours>     maximum number of hours to search
         num=<num>             number of matches to find (def=1)
    
       the following keywords are required:
    
         group
         descr
         id, co, or reg
    
       an example URL might look like:
         adde://adde.ucar.edu/obtext?group=rtwxtext&descr=sfchourly&id=kden&num=2
    
     
    • Constructor Summary

      Constructors 
      Constructor and Description
      AddeTextReader(java.lang.String request)
      Creates an AddeTextReader object that allows reading an ADDE text file or weather text
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.Vector getLinesOfText() 
      int getNumLines()
      Return the number of lines of text that were read.
      java.lang.String getStatus()
      Get a string representation of the status code
      int getStatusCode()
      Return the status code of the read
      java.lang.String getText()
      Return the text read from the server.
      java.util.List<WxTextProduct> getWxTextProducts() 
      static void main(java.lang.String[] args)
      test by running 'java edu.wisc.ssec.mcidas.adde.AddeTextReader'
      • Methods inherited from class java.lang.Object

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

      • AddeTextReader

        public AddeTextReader(java.lang.String request)
        Creates an AddeTextReader object that allows reading an ADDE text file or weather text
        Parameters:
        request - ADDE URL to read from. See class javadoc.
    • Method Detail

      • getStatus

        public java.lang.String getStatus()
        Get a string representation of the status code
        Returns:
        human readable status
      • getStatusCode

        public int getStatusCode()
        Return the status code of the read
        Returns:
        status code (>0 == read okay);
      • getNumLines

        public int getNumLines()
        Return the number of lines of text that were read.
        Returns:
        number of lines.
      • getText

        public java.lang.String getText()
        Return the text read from the server. If there was a problem the error message is returned.
        Returns:
        text from server or error message
      • getLinesOfText

        public java.util.Vector getLinesOfText()
      • getWxTextProducts

        public java.util.List<WxTextProduct> getWxTextProducts()
      • main

        public static void main(java.lang.String[] args)
                         throws java.lang.Exception
        test by running 'java edu.wisc.ssec.mcidas.adde.AddeTextReader'
        Throws:
        java.lang.Exception

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.