nl.itc.RIMapper
Class ParseXML

java.lang.Object
  extended by nl.itc.RIMapper.ParseXML

public class ParseXML
extends java.lang.Object

Parses RIMapper XML files and returns handles to further process them into SVG output.
NOTE: this is the older way of configuring RIMapper instances (pre-WMS).
©2004-6 International Institute for Geo-information Science and Earth Observation (ITC)
Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. see http://creativecommons.org/licenses/by-nc-sa/2.5/

Version:
1.1 [April 2004]
Author:
Barend Köbben - kobben@itc.nl

Field Summary
 java.lang.String author
           
static java.lang.String DEFAULT_PARSER_NAME
           
(package private)  double FalseOriginX
           
(package private)  double FalseOriginY
           
 java.lang.String[] fragmentNames
           
 java.lang.String[] fragments
           
 java.lang.String[] fragmentTypes
           
 java.lang.String[][] layerActions
           
 java.lang.String[][] layerActionScopes
           
 java.lang.String[] layerAttribs
           
 java.lang.String[] layerNames
           
 java.lang.String[] layerStyles
           
 java.lang.String[] layerStyleTypes
           
(package private)  boolean mapExtentDefault
           
static int MAX_ACTIONS_PER_LAYER
           
 int nrFragments
           
 int[] nrLayerActions
           
 int nrLayers
           
 int nrStyles
           
(package private)  long Precision
           
 java.lang.String RIM_DB
           
 java.lang.String RIM_PW
           
 java.lang.String RIM_SFSserver
           
 java.lang.String RIM_Type
           
 java.lang.String RIM_UN
           
 java.lang.String[] styleNames
           
 java.lang.String[] styles
           
 java.lang.String SVGRootFragment
           
 java.lang.String SVGRootFragmentName
           
 java.lang.String title
           
static java.lang.String VALIDATION_URL
           
(package private)  double Xmax
           
(package private)  double Xmin
           
 org.w3c.dom.Document XMLtree
           
(package private)  double Ymax
           
(package private)  double Ymin
           
 
Constructor Summary
ParseXML()
           
 
Method Summary
 void getActions(int currentLayer, org.w3c.dom.NodeList currentLayerChildren)
          
returns nothing,sets instance fields layerActionScopes, layerActions
 void getAuthor(org.w3c.dom.Document XMLtree)
          Get the names of XML AUTHOR node (concatenates if more nodes).
 void getFragments(org.w3c.dom.Document XMLtree)
          Get the names and Fragment strings (if in XML) of XML FRAGMENT nodes.
 void getLayers(org.w3c.dom.Document XMLtree)
          Get the names of XML LAYERs node.
private  java.util.Properties getNodeAttributes(org.w3c.dom.Node node)
          Get the attributes of an XML node and returns them as a Properties list.
 void getRIM(org.w3c.dom.Document XMLtree)
          Get the attributes of XML RIM node.
 void getStyles(org.w3c.dom.Document XMLtree)
          Get the names and style strings (if in XML) of XML STYLEs node.
 void getTitle(org.w3c.dom.Document XMLtree)
          Get the names of XML TITLE node (concatenates if more nodes).
 void getXMLtree(java.lang.String XMLfile, boolean validate)
          Parses XML file and returns the document tree.
private static java.lang.String readString(org.w3c.dom.Node node)
          Gets the content (TEXT or CDATA readable text) out of an XML node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_ACTIONS_PER_LAYER

public static final int MAX_ACTIONS_PER_LAYER
See Also:
Constant Field Values

DEFAULT_PARSER_NAME

public static final java.lang.String DEFAULT_PARSER_NAME
See Also:
Constant Field Values

VALIDATION_URL

public static final java.lang.String VALIDATION_URL
See Also:
Constant Field Values

XMLtree

public org.w3c.dom.Document XMLtree

RIM_Type

public java.lang.String RIM_Type

RIM_SFSserver

public java.lang.String RIM_SFSserver

RIM_DB

public java.lang.String RIM_DB

RIM_UN

public java.lang.String RIM_UN

RIM_PW

public java.lang.String RIM_PW

Xmin

double Xmin

Ymin

double Ymin

Xmax

double Xmax

Ymax

double Ymax

FalseOriginX

double FalseOriginX

FalseOriginY

double FalseOriginY

Precision

long Precision

mapExtentDefault

boolean mapExtentDefault

title

public java.lang.String title

author

public java.lang.String author

nrLayers

public int nrLayers

layerNames

public java.lang.String[] layerNames

layerAttribs

public java.lang.String[] layerAttribs

nrLayerActions

public int[] nrLayerActions

layerActions

public java.lang.String[][] layerActions

layerActionScopes

public java.lang.String[][] layerActionScopes

layerStyles

public java.lang.String[] layerStyles

layerStyleTypes

public java.lang.String[] layerStyleTypes

nrStyles

public int nrStyles

styleNames

public java.lang.String[] styleNames

styles

public java.lang.String[] styles

nrFragments

public int nrFragments

fragmentNames

public java.lang.String[] fragmentNames

fragmentTypes

public java.lang.String[] fragmentTypes

fragments

public java.lang.String[] fragments

SVGRootFragmentName

public java.lang.String SVGRootFragmentName

SVGRootFragment

public java.lang.String SVGRootFragment
Constructor Detail

ParseXML

public ParseXML()
Method Detail

readString

private static java.lang.String readString(org.w3c.dom.Node node)
Gets the content (TEXT or CDATA readable text) out of an XML node.

Parameters:
node - the XML node
Returns:
a String with the text

getNodeAttributes

private java.util.Properties getNodeAttributes(org.w3c.dom.Node node)
Get the attributes of an XML node and returns them as a Properties list.

Parameters:
node - the XML node
Returns:
Properties list

getRIM

public void getRIM(org.w3c.dom.Document XMLtree)
            throws RIMapperException
Get the attributes of XML RIM node.
void,sets instance field title

Parameters:
XMLtree - the Document Tree in memory as parsed by getXMLtree
Throws:
RIMapperException

getTitle

public void getTitle(org.w3c.dom.Document XMLtree)
              throws RIMapperException
Get the names of XML TITLE node (concatenates if more nodes).
void,sets instance field title

Parameters:
XMLtree - the Document Tree in memory as parsed by getXMLtree
Throws:
RIMapperException

getAuthor

public void getAuthor(org.w3c.dom.Document XMLtree)
               throws RIMapperException
Get the names of XML AUTHOR node (concatenates if more nodes).
returns nothing,sets instance field title

Parameters:
XMLtree - the Document Tree in memory as parsed by getXMLtree
Throws:
RIMapperException

getStyles

public void getStyles(org.w3c.dom.Document XMLtree)
               throws RIMapperException
Get the names and style strings (if in XML) of XML STYLEs node.
returns nothing,sets instance fields nrStyles, styleNames,styles

Parameters:
XMLtree - the Document Tree in memory as parsed by getXMLtree
Throws:
RIMapperException

getFragments

public void getFragments(org.w3c.dom.Document XMLtree)
                  throws RIMapperException
Get the names and Fragment strings (if in XML) of XML FRAGMENT nodes.
returns nothing,sets instance fields nrFragments, fragmentNames, fragments

Parameters:
XMLtree - the Document Tree in memory as parsed by getXMLtree
Throws:
RIMapperException

getActions

public void getActions(int currentLayer,
                       org.w3c.dom.NodeList currentLayerChildren)
                throws RIMapperException

returns nothing,sets instance fields layerActionScopes, layerActions

Parameters:
currentLayer -
currentLayerChildren -
Throws:
RIMapperException

getLayers

public void getLayers(org.w3c.dom.Document XMLtree)
               throws RIMapperException
Get the names of XML LAYERs node.

Parameters:
XMLtree - the Document Tree in memory as parsed by getXMLtree returns nothing (sets instance fields nrLayers, layerNames, layerActionScopes, layerActions layerStyles, layerStyleTypes)
Throws:
RIMapperException

getXMLtree

public void getXMLtree(java.lang.String XMLfile,
                       boolean validate)
                throws RIMapperException
Parses XML file and returns the document tree.

Parameters:
XMLfile - the URL or file path
validate - sets DTD validation on/off returns the document tree
Throws:
RIMapperException