com.moximedia.ows.xml
Class Xml

java.lang.Object
  extended bycom.moximedia.ows.xml.Xml

public class Xml
extends java.lang.Object

Various methods relating to XML communication.

Author:
Doug Cates - www.moximedia.com

Constructor Summary
Xml()
           
 
Method Summary
static boolean applyMapConfig(java.lang.String urlString, Map map, Config conf)
          Sets properties of the map object from a URL containing XML.
static boolean applySiteConfig(java.lang.String urlString, Config conf)
          Sets properties of the site configuration object from a URL containing XML.
static boolean applyThemeConfig(java.lang.String urlString, Config conf)
          Creates theme objects from a URL containing XML.
static boolean applyXmlSecurity(java.lang.String xml, Config conf)
           
static java.lang.String fixAmpersands(java.lang.String xml)
           
static boolean parseGetFeatureInfoResults(WmsLayer lyr, java.lang.String xml, java.lang.String saxParser)
          Parses an XML GetFeatureInfo response.
static Recordset parseGetFeatureResults(Recordset rs, java.lang.String xml, java.lang.String parsingFormat)
          Parses a GetFeature XML response into a recordset using the specified handler.
static Recordset parseGetFeatureResults(java.lang.String xml)
          Parses a GetFeature XML response into a recordset using the default GML2 handler.
static Recordset parseGetFeatureResults(java.lang.String xml, java.lang.String parsingFormat)
          Parses a GetFeature XML response into a recordset using the specified handler.
static java.lang.String readFromUrl(java.lang.String urlString)
          Reads the contents of a URL and returns it as a string.
static java.lang.String readFromUrl(java.lang.String urlString, java.lang.String authentication)
          Reads the contents of a URL and returns it as a string.
static java.lang.String readFromUrlPost(java.lang.String urlString, java.lang.String postString)
          Reads the contents of a URL and returns it as a string.
static java.lang.String readLinesFromUrl(java.lang.String urlString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Xml

public Xml()
Method Detail

applyXmlSecurity

public static boolean applyXmlSecurity(java.lang.String xml,
                                       Config conf)

applyMapConfig

public static boolean applyMapConfig(java.lang.String urlString,
                                     Map map,
                                     Config conf)
Sets properties of the map object from a URL containing XML.

Parameters:
urlString - The complete URL path (eg. http://somehost/file.xml)
map - The map object to apply the properties to.
conf - The configuration object containing site properties.
Returns:
True if successful, otherwize false.

applyThemeConfig

public static boolean applyThemeConfig(java.lang.String urlString,
                                       Config conf)
Creates theme objects from a URL containing XML.

Parameters:
urlString - The complete URL path (eg. http://somehost/file.xml)
conf - The configuration object containing site properties.
Returns:
True if successful, otherwize false.

applySiteConfig

public static boolean applySiteConfig(java.lang.String urlString,
                                      Config conf)
Sets properties of the site configuration object from a URL containing XML.

Parameters:
urlString - The complete URL path (eg. http://somehost/file.xml)
conf - The configuration object to apply the properties to.
Returns:
True if successful, otherwize false.

parseGetFeatureResults

public static Recordset parseGetFeatureResults(java.lang.String xml)
Parses a GetFeature XML response into a recordset using the default GML2 handler.

Parameters:
xml - The XML to be parsed.
Returns:
The populated recordset

parseGetFeatureResults

public static Recordset parseGetFeatureResults(java.lang.String xml,
                                               java.lang.String parsingFormat)
Parses a GetFeature XML response into a recordset using the specified handler.

Parameters:
xml - The XML to be parsed.
parsingFormat - The complete class name of the parsing handler.
Returns:
The populated recordset

parseGetFeatureResults

public static Recordset parseGetFeatureResults(Recordset rs,
                                               java.lang.String xml,
                                               java.lang.String parsingFormat)
Parses a GetFeature XML response into a recordset using the specified handler.

Parameters:
rs - The recordset to populate.
xml - The XML to be parsed.
parsingFormat - The complete class name of the parsing handler.
Returns:
The populated recordset

parseGetFeatureInfoResults

public static boolean parseGetFeatureInfoResults(WmsLayer lyr,
                                                 java.lang.String xml,
                                                 java.lang.String saxParser)
Parses an XML GetFeatureInfo response.

Parameters:
lyr -
saxParser -
Returns:
True if parsed successfully, otherwise false.

readFromUrl

public static java.lang.String readFromUrl(java.lang.String urlString)
Reads the contents of a URL and returns it as a string.

Parameters:
urlString - The URL to open.
Returns:
The contents of the URL, or null if there is an error.

readFromUrl

public static java.lang.String readFromUrl(java.lang.String urlString,
                                           java.lang.String authentication)
Reads the contents of a URL and returns it as a string.

Parameters:
authentication -
urlString - The URL to open.
Returns:
The contents of the URL, or null if there is an error.

readFromUrlPost

public static java.lang.String readFromUrlPost(java.lang.String urlString,
                                               java.lang.String postString)
Reads the contents of a URL and returns it as a string.

Parameters:
urlString - The URL to open.
postString - The data to post to the URL.
Returns:
The contents of the URL, or null if there is an error.

readLinesFromUrl

public static java.lang.String readLinesFromUrl(java.lang.String urlString)
Parameters:
urlString -
Returns:

fixAmpersands

public static java.lang.String fixAmpersands(java.lang.String xml)
Parameters:
xml -
Returns:


Internet Mapping Framework for OpenGIS Java Object Model API (v1.3.007)
Copyright © 2005 Moxi Media Inc. and Province of British Columbia. All Rights Reserved.