Java Doc for KvpRequestReader.java in  » GIS » GeoServer » org » vfny » geoserver » util » requests » readers » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoServer » org.vfny.geoserver.util.requests.readers 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.vfny.geoserver.util.requests.readers.KvpRequestReader

All known Subclasses:   org.vfny.geoserver.wms.requests.WmsKvpRequestReader,  org.vfny.geoserver.wcs.requests.readers.GetCoverageKvpReader,  org.vfny.geoserver.wcs.requests.readers.CapabilitiesKvpReader,  org.vfny.geoserver.wms.requests.CapabilitiesKvpReader,  org.vfny.geoserver.wcs.requests.readers.DescribeKvpReader,  org.vfny.geoserver.sld.requests.PutStylesKvpReader,
KvpRequestReader
abstract public class KvpRequestReader (Code)
Base class for all KVP readers, with some generalized convenience methods.

If you pass this utility a KVP request (everything after the '?' in the GET request URI), it will translate this into a list of key-word value pairs.These pairs represent every element in the KVP GET request, legal or otherwise. This class may then be subclassed and used by request-specific classes. Because there is no error checking for the KVPs in this class, subclasses must check for validity of their KVPs before passing the their requests along, but - in return - this parent class is quite flexible. For example, native KVPs may be easily parsed in its subclasses, since they are simply read and stored (without analysis) in the constructer in this class. Note that all keys are translated to upper case to avoid case conflicts.


author:
   Rob Hranac, TOPP
author:
   Chris Holmes, TOPP
author:
   Gabriel Roldan
version:
   $Id: KvpRequestReader.java 8179 2008-01-16 16:56:48Z groldan $


Field Summary
final protected static  StringINNER_DELIMETER
    
final protected static  StringOUTER_DELIMETER
    
final protected static  FilterFactoryfactory
    
protected  MapkvpPairs
    
protected  AbstractServiceservice
    

Constructor Summary
public  KvpRequestReader(Map kvpPairs, AbstractService service)
     Creates a reader from paramters and a service.

Method Summary
abstract public  RequestgetRequest(HttpServletRequest request)
    
public  AbstractServicegetServiceRef()
     Returns the service handling request.
protected  ListgetTypesFromFids(String rawFidList)
     Attempts to parse out the proper typeNames from the FeatureId filters. It simply uses the value before the '.' character.
Parameters:
  rawFidList - the strings after the FEATUREID url component.
protected  StringgetValue(String key)
    
protected  booleankeyExists(String key)
    
protected  EnvelopeparseBbox(String bboxParam)
    
public static  MapparseKvpSet(String qString)
    
protected  FilterparseXMLFilter(Reader rawRequest)
     Reads the Filter XML request into a geotools Feature object.
Parameters:
  rawRequest - The plain POST text from the client.
protected  ListreadCQLFilter(String filter)
    
protected  ListreadFidFilters(String fid)
    
protected static  ListreadFlat(String rawList, String delimiter)
     Reads a tokenized string and turns it into a list.
protected static  ListreadNested(String rawList)
     Reads a nested tokenized string and turns it into a list.
protected  ListreadOGCFilter(String filter)
    
public  voidsetServiceRef(AbstractService service)
     sets the service handling request.

Field Detail
INNER_DELIMETER
final protected static String INNER_DELIMETER(Code)
Delimeter for inner value lists in the KVPs



OUTER_DELIMETER
final protected static String OUTER_DELIMETER(Code)
Delimeter for outer value lists in the KVPs



factory
final protected static FilterFactory factory(Code)
Holds mappings between HTTP and ASCII encodings



kvpPairs
protected Map kvpPairs(Code)
KVP pair listing; stores all data from the KVP request



service
protected AbstractService service(Code)
Reference to the service using the reader




Constructor Detail
KvpRequestReader
public KvpRequestReader(Map kvpPairs, AbstractService service)(Code)
Creates a reader from paramters and a service.
Parameters:
  kvpPairs - The key-value pairs.
Parameters:
  service - The service using the reader.




Method Detail
getRequest
abstract public Request getRequest(HttpServletRequest request) throws ServiceException(Code)
returns the propper Request subclass for the set of parameters it was setted up and the kind of request it is specialized for DOCUMENT ME!



getServiceRef
public AbstractService getServiceRef()(Code)
Returns the service handling request.



getTypesFromFids
protected List getTypesFromFids(String rawFidList)(Code)
Attempts to parse out the proper typeNames from the FeatureId filters. It simply uses the value before the '.' character.
Parameters:
  rawFidList - the strings after the FEATUREID url component. Should be foundusing kvpPairs.get("FEATUREID") in this class or one of itschildren A list of typenames, made from the featureId filters.
throws:
  WfsException - If the structure can not be read.



getValue
protected String getValue(String key)(Code)
returns the value asociated with key on the set of key/value pairs of this request reader
Parameters:
  key - DOCUMENT ME! DOCUMENT ME!



keyExists
protected boolean keyExists(String key)(Code)
DOCUMENT ME!
Parameters:
  key - DOCUMENT ME! DOCUMENT ME!



parseBbox
protected Envelope parseBbox(String bboxParam) throws ServiceException(Code)
parses the BBOX parameter, wich must be a String of the form minx,miny,maxx,maxy and returns a corresponding Envelope object
Parameters:
  bboxParam - TODO the Envelope represented by the request BBOXparameter
throws:
  WmsException - if the value of the BBOX request parameter can't beparsed as four double's



parseKvpSet
public static Map parseKvpSet(String qString)(Code)
creates a Map of key/value pairs from a HTTP style query String
Parameters:
  qString - DOCUMENT ME! DOCUMENT ME!



parseXMLFilter
protected Filter parseXMLFilter(Reader rawRequest) throws ServiceException(Code)
Reads the Filter XML request into a geotools Feature object.
Parameters:
  rawRequest - The plain POST text from the client. The geotools filter constructed from rawRequest.
throws:
  WfsException - For any problems reading the request.FilterKvpParser



readCQLFilter
protected List readCQLFilter(String filter) throws ServiceException(Code)
Parses a CQL filter
Parameters:
  filter -
throws:
  ServiceException - CQLFilterKvpParser



readFidFilters
protected List readFidFilters(String fid)(Code)
Parses fid filters
Parameters:
  fid -



readFlat
protected static List readFlat(String rawList, String delimiter)(Code)
Reads a tokenized string and turns it into a list. In this method, the tokenizer is quite flexible. Note that if the list is unspecified (ie. is null) or is unconstrained (ie. is ''), then the method returns an empty list.
Parameters:
  rawList - The tokenized string.
Parameters:
  delimiter - The delimeter for the string tokens. A list of the tokenized string.



readNested
protected static List readNested(String rawList)(Code)
Reads a nested tokenized string and turns it into a list. This method is much more specific to the KVP get request syntax than the more general readFlat method. In this case, the outer tokenizer '()' and inner tokenizer ',' are both from the specification. Returns a list of lists.
Parameters:
  rawList - The tokenized string. A list of lists, containing outer and inner elements.
throws:
  WfsException - When the string structure cannot be read.



readOGCFilter
protected List readOGCFilter(String filter) throws ServiceException(Code)
Parses an OGC filter
Parameters:
  filter -
throws:
  ServiceException -



setServiceRef
public void setServiceRef(AbstractService service)(Code)
sets the service handling request.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.