Esri Geoportal Server
1.2.9

com.esri.gpt.catalog.gxe
Class GxeLoader

java.lang.Object
  extended by com.esri.gpt.catalog.gxe.GxeLoader

public class GxeLoader
extends Object

Handles the loading of a Geoportal XML editor definition.


Constructor Summary
GxeLoader()
          Default constructor
 
Method Summary
protected  void checkI18NAttributes(GxeContext context, GxeFile file, Node domNode, XmlElement gxeElement)
          Checks the I18N (internationalization and localization) attributes for an XmlElement.
protected  String getTextContent(Node domNode, boolean first)
          Gets the text associated with a node.
 void loadDefinition(GxeContext context, GxeDefinition definition)
          Loads a Geoportal XML editor definition.
protected  void loadXmlAttributes(GxeContext context, GxeFile file, Node domNode, XmlElement gxeElement)
          Loads the XmlAttributes associated with an XmlElement.
protected  void loadXmlChildren(GxeContext context, GxeFile file, Node domNode, XmlElement gxeElement)
          Loads the child XmlElements associated with an XmlElement.
protected  void loadXmlElement(GxeContext context, GxeFile file, Node domNode, XmlElement gxeElement)
          Loads an XmlElement.
protected  void loadXmlNodeInfo(GxeContext context, GxeFile file, Node domNode, XmlNode gxeNode)
          Loads the XmlNodeInfo associated with an XmlNode.
 void onXmlElementLoaded(GxeContext context, GxeFile file, Node domNode, XmlElement gxeElement)
          Fired when an XmlElement has been loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GxeLoader

public GxeLoader()
Default constructor

Method Detail

checkI18NAttributes

protected void checkI18NAttributes(GxeContext context,
                                   GxeFile file,
                                   Node domNode,
                                   XmlElement gxeElement)
                            throws Exception
Checks the I18N (internationalization and localization) attributes for an XmlElement.
Any element that has a g:targetName attribute with no g:label attribute will be processed.
A g:label attribute will be added to the element, value = "$i18nBase."+localNameForTarget
E.g.
Parameters:
context - the processing context
file - the file that is currently being processed
domNode - the active DOM node
gxeElement - the active XmlElement
Throws:
Exception - if an exception occurs

getTextContent

protected String getTextContent(Node domNode,
                                boolean first)
Gets the text associated with a node.

Parameters:
domNode - the subject node
first - if true, get the first text node associated with an element node
Returns:
the text (can be null)

loadDefinition

public void loadDefinition(GxeContext context,
                           GxeDefinition definition)
                    throws Exception
Loads a Geoportal XML editor definition.
The file location within the definition must be set prior invoking this method.

Parameters:
context - the processing context
definition - the definition to be loaded
Throws:
Exception - if an exception occurs

loadXmlAttributes

protected void loadXmlAttributes(GxeContext context,
                                 GxeFile file,
                                 Node domNode,
                                 XmlElement gxeElement)
                          throws Exception
Loads the XmlAttributes associated with an XmlElement.

Parameters:
context - the processing context
file - the file that is currently being processed
domNode - the active DOM node
gxeElement - the active XmlElement
Throws:
Exception - if an exception occurs

loadXmlChildren

protected void loadXmlChildren(GxeContext context,
                               GxeFile file,
                               Node domNode,
                               XmlElement gxeElement)
                        throws Exception
Loads the child XmlElements associated with an XmlElement.

Parameters:
context - the processing context
file - the file that is currently being processed
domNode - the active DOM node
gxeElement - the active XmlElement
Throws:
Exception - if an exception occurs

loadXmlElement

protected void loadXmlElement(GxeContext context,
                              GxeFile file,
                              Node domNode,
                              XmlElement gxeElement)
                       throws Exception
Loads an XmlElement.

Parameters:
context - the processing context
file - the file that is currently being processed
domNode - the active DOM node
gxeElement - the active XmlElement
Throws:
Exception - if an exception occurs

loadXmlNodeInfo

protected void loadXmlNodeInfo(GxeContext context,
                               GxeFile file,
                               Node domNode,
                               XmlNode gxeNode)
                        throws Exception
Loads the XmlNodeInfo associated with an XmlNode.

Parameters:
context - the processing context
file - the file that is currently being processed
domNode - the active DOM node
gxeNode - the active XmlNode (XmlElement or XmlAttribute)
Throws:
Exception - if an exception occurs

onXmlElementLoaded

public void onXmlElementLoaded(GxeContext context,
                               GxeFile file,
                               Node domNode,
                               XmlElement gxeElement)
                        throws Exception
Fired when an XmlElement has been loaded.

Parameters:
context - the processing context
file - the file that is currently being processed
domNode - the active DOM node
gxeElement - the active XmlElement
Throws:
Exception - if an exception occurs

Esri Geoportal Server
1.2.9

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.