| java.lang.Object org.iscreen.impl.xml.PositionContext
PositionContext | public class PositionContext (Code) | | Instances of this class track the position within a "stack" (such as an XML
hierarchy) and is used for error messages, giving the user as much information
about where the error occurred as possible.
author: Shellman, Dan |
Constructor Summary | |
public | PositionContext(String theFileLocation) Constructor taking the location of the root "file" location. |
Method Summary | |
public String | getFileLocation() Retrieves the root file location. | public String | getLocation() Builds and returns the context path or full location of
the "position" this instance represents. | public String | popNode() Removes the top-most node from the context (and all associated
attributes of that node). | public void | pushAttr(String attr, String value) Pushes an attribute and its value onto the current node (the one at
the top of the stack). | public void | pushNode(String node) Pushes a node onto the top of the context. |
PositionContext | public PositionContext(String theFileLocation)(Code) | | Constructor taking the location of the root "file" location.
Parameters: theFileLocation - The root "file" location. |
getFileLocation | public String getFileLocation()(Code) | | Retrieves the root file location.
Returns the root file location. |
getLocation | public String getLocation()(Code) | | Builds and returns the context path or full location of
the "position" this instance represents. This method is
called to get the location information so that it can be
logged.
Returns the full context path/location of this context. |
popNode | public String popNode()(Code) | | Removes the top-most node from the context (and all associated
attributes of that node).
Returns the top-most node (removing it from the stack). |
pushAttr | public void pushAttr(String attr, String value)(Code) | | Pushes an attribute and its value onto the current node (the one at
the top of the stack). This should only be called after a call to
pushNode(). However, it can be called multiple times for a particular
node (though the attribute name must be unique, or subsequent calls
will override the value).
Parameters: attr - The name of the attribute. Parameters: value - The value of the attribute. |
pushNode | public void pushNode(String node)(Code) | | Pushes a node onto the top of the context. This is the primary method
of supplying an additional context.
Parameters: node - The name of the node. |
|
|