org.gvsig.remoteclient.ogc
Class OGCProtocolHandler

java.lang.Object
  extended by org.gvsig.remoteclient.ogc.OGCProtocolHandler
Direct Known Subclasses:
WCSProtocolHandler, WFSProtocolHandler, WMSProtocolHandler, WMTSProtocolHandler

public abstract class OGCProtocolHandler
extends java.lang.Object


Field Summary
protected static org.gvsig.compat.net.Downloader downloader
           
protected  java.lang.String host
          host of the WMS to connect
protected  java.lang.String name
          procotol handler name
protected  java.lang.String port
          port number of the comunication channel of the WMS to connect
protected  java.lang.String version
          protocol handler version
 
Constructor Summary
OGCProtocolHandler()
           
 
Method Summary
protected  void addOperationByAttribute(org.kxml2.io.KXmlParser parser, java.lang.String operation, int protocol)
          Add an operation and the online resource
protected  byte[] fileToBytes(java.io.File file)
          Copy the file in a byte array
 java.lang.String getHost()
           
 java.lang.String getName()
           
 java.lang.String getPort()
           
abstract  OGCServiceInformation getServiceInformation()
           
protected static java.lang.String getSymbol(java.lang.String h)
          Just for not repeat code.
 java.lang.String getVersion()
           
abstract  boolean parseCapabilities(java.io.File f)
          parses the data retrieved by the Capabilities XML document
protected  void parseHTTPTag(org.kxml2.io.KXmlParser parser, java.lang.String operation)
          Parse an operation into a HTTP tag
protected  void parserDcpType(org.kxml2.io.KXmlParser parser, java.lang.String operation)
          Parse an operation into a DcpType tag
 void setHost(java.lang.String host)
           
 void setName(java.lang.String name)
           
 void setPort(java.lang.String port)
           
 void setVersion(java.lang.String version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

downloader

protected static final org.gvsig.compat.net.Downloader downloader

host

protected java.lang.String host
host of the WMS to connect


name

protected java.lang.String name
procotol handler name


port

protected java.lang.String port
port number of the comunication channel of the WMS to connect


version

protected java.lang.String version
protocol handler version

Constructor Detail

OGCProtocolHandler

public OGCProtocolHandler()
Method Detail

addOperationByAttribute

protected void addOperationByAttribute(org.kxml2.io.KXmlParser parser,
                                       java.lang.String operation,
                                       int protocol)
Add an operation and the online resource

Parameters:
parser - The parser
operation - The operation to add
protocol - The parser to add

fileToBytes

protected byte[] fileToBytes(java.io.File file)
                      throws java.io.IOException
Copy the file in a byte array

Parameters:
file - The file to copy
Returns:
An array of bytes
Throws:
java.io.IOException

getHost

public java.lang.String getHost()
Returns:
Returns the host.

getName

public java.lang.String getName()
Returns:
Returns the name.

getPort

public java.lang.String getPort()
Returns:
Returns the port.

getServiceInformation

public abstract OGCServiceInformation getServiceInformation()

getSymbol

protected static java.lang.String getSymbol(java.lang.String h)
Just for not repeat code. Gets the correct separator according to the server URL

Parameters:
h -
Returns:

getVersion

public java.lang.String getVersion()
Returns:
Returns the version.

parseCapabilities

public abstract boolean parseCapabilities(java.io.File f)
parses the data retrieved by the Capabilities XML document


parseHTTPTag

protected void parseHTTPTag(org.kxml2.io.KXmlParser parser,
                            java.lang.String operation)
                     throws org.xmlpull.v1.XmlPullParserException,
                            java.io.IOException
Parse an operation into a HTTP tag

Parameters:
parser - The KXMLParser
operation - The WFS operation to parse
Throws:
java.io.IOException
org.xmlpull.v1.XmlPullParserException

parserDcpType

protected void parserDcpType(org.kxml2.io.KXmlParser parser,
                             java.lang.String operation)
                      throws org.xmlpull.v1.XmlPullParserException,
                             java.io.IOException
Parse an operation into a DcpType tag

Parameters:
parser - The KXMLParser
operation - The WFS operation to parse
Throws:
java.io.IOException
org.xmlpull.v1.XmlPullParserException

setHost

public void setHost(java.lang.String host)
Parameters:
host - The host to set.

setName

public void setName(java.lang.String name)
Parameters:
name - The name to set.

setPort

public void setPort(java.lang.String port)
Parameters:
port - The port to set.

setVersion

public void setVersion(java.lang.String version)
Parameters:
version - The version to set.


Copyright © 2014 gvSIG Association. All Rights Reserved.