com.esri.aims.mtier.model.axl
Class Util

java.lang.Object
  |
  +--com.esri.aims.mtier.model.axl.Util
Direct Known Subclasses:
AdminUtil

public class Util
extends Object

Implements utility methods for AXL building and parsing.


Field Summary
static String CURRENT_AXL_VERSION
          Defines the current AXL version being used in requests.
static String DEFAULT_SAX_PARSER
          Defines the default SAX parser used within the object model.
static String ENCODING
          Defines the encoding used to parse.
 
Constructor Summary
Util()
           
 
Method Summary
static com.esri.w3c.dom.Element addChildren(com.esri.w3c.dom.Element parent, com.esri.w3c.dom.Element[] children)
          Adds an array of Elements as children to a given node.
protected static com.esri.w3c.dom.Document createDocument()
           
static com.esri.w3c.dom.Document createRequestDocument(com.esri.w3c.dom.Element request)
          Creates a document using the request argument as the body of the request.
static com.esri.w3c.dom.Document createRequestDocument(com.esri.w3c.dom.Element request, String version)
          Creates a document using the request argument as the body of the request.
static String documentToString(com.esri.w3c.dom.Document doc)
          Converts the given Document object to a String.
static void setCurrentAXLVersion(String version)
          Defines current AXL version number.
static void setParserEncoding(String encoding)
          Sets the encoding value for parsing.
static void setSAXParser(String parserClasspath)
          Defines the parser classpath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CURRENT_AXL_VERSION

public static String CURRENT_AXL_VERSION
Defines the current AXL version being used in requests.


DEFAULT_SAX_PARSER

public static String DEFAULT_SAX_PARSER
Defines the default SAX parser used within the object model.


ENCODING

public static String ENCODING
Defines the encoding used to parse. System default is default.

Constructor Detail

Util

public Util()
Method Detail

setParserEncoding

public static void setParserEncoding(String encoding)
Sets the encoding value for parsing.


setSAXParser

public static void setSAXParser(String parserClasspath)
Defines the parser classpath.


setCurrentAXLVersion

public static void setCurrentAXLVersion(String version)
Defines current AXL version number.


addChildren

public static com.esri.w3c.dom.Element addChildren(com.esri.w3c.dom.Element parent,
                                                   com.esri.w3c.dom.Element[] children)
Adds an array of Elements as children to a given node.

Parameters:
parent - The parent Element to add children to.
Returns:
The parent Element.

documentToString

public static String documentToString(com.esri.w3c.dom.Document doc)
Converts the given Document object to a String.

Parameters:
doc - the Document to be converted to a String.
Returns:
String the Document converted into a String.

createRequestDocument

public static com.esri.w3c.dom.Document createRequestDocument(com.esri.w3c.dom.Element request,
                                                              String version)
Creates a document using the request argument as the body of the request. For instance, if the request Element were to be represented in AXL as:

 
   
     
   
 
  

The document produced by this method would be represented in AXL as:


 
   
     
       
         
       
     
   
 
 

Parameters:
request - the request element to be used. A deep import is done on this Element (importing all sub-Elements).
version - the version of ArcXML to use.
Returns:
Document A document representing this request.

createRequestDocument

public static com.esri.w3c.dom.Document createRequestDocument(com.esri.w3c.dom.Element request)
Creates a document using the request argument as the body of the request. This has the same effect as calling createRequestDocument(request, CURRENT_AXL_VERSION).

Parameters:
request - The request element to be used. A deep import is done on this Element (importing all sub-Elements).
Returns:
Document A document representing this request.
See Also:

createDocument

protected static com.esri.w3c.dom.Document createDocument()