com.openharbor.beck.xpath
Class OHXPathElement

java.lang.Object
  extended bycom.openharbor.beck.xpath.OHXPathElement

public class OHXPathElement
extends java.lang.Object

A single attribute per path element is supported at this time, since we dont anticipate having more than one attribute Namespaces receive no special handling: they're contained as a part of the element (or attribute) name.

Created by IntelliJ IDEA. User: Ilya Date: Sep 14, 2004 Time: 6:01:38 PM To change this template use File | Settings | File Templates.


Field Summary
protected  XMLName attributeName
           
protected  java.lang.String attributeValue
           
 
Constructor Summary
OHXPathElement(XMLName name)
          Constructs a path element wiht the given name and with no attribute
OHXPathElement(XMLName name, XMLName attrKey, java.lang.String attrValue)
          Constructs a path element with the given name and attribute
 
Method Summary
 java.lang.String getAtributeValue()
          Returns null if the path element does not contain an attribute; value of the attribute otherwise
 XMLName getAttributeName()
          Returns null if the path element does not contain an attribute; name of the attribute otherwise
 java.lang.Object[] getGetterParameters()
          Returns the array of parameters that the getter corresponding to thsi Path Element is supposed to take.
 XMLName getName()
          Returns the name of the path element
 XMLThing getThing()
          Returns an XMLThing-representation of the path element
 java.lang.String toString()
           
 java.lang.String toString(Prefixer prefixer)
           
 java.lang.String toString(XMLWriter prefixer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

attributeName

protected XMLName attributeName

attributeValue

protected java.lang.String attributeValue
Constructor Detail

OHXPathElement

public OHXPathElement(XMLName name)
Constructs a path element wiht the given name and with no attribute

Parameters:
name - name of the OHXPath element

OHXPathElement

public OHXPathElement(XMLName name,
                      XMLName attrKey,
                      java.lang.String attrValue)
Constructs a path element with the given name and attribute

Parameters:
name - name of the OHXPath element
attrKey - name of the attribute
attrValue - value of the attribute
Method Detail

getName

public final XMLName getName()
Returns the name of the path element

Returns:
name of the element

getAttributeName

public final XMLName getAttributeName()
Returns null if the path element does not contain an attribute; name of the attribute otherwise

Returns:
name of the attribute

getAtributeValue

public final java.lang.String getAtributeValue()
Returns null if the path element does not contain an attribute; value of the attribute otherwise

Returns:
value of the attribute

toString

public java.lang.String toString()

toString

public java.lang.String toString(Prefixer prefixer)
                          throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString(XMLWriter prefixer)
                          throws java.io.IOException
Throws:
java.io.IOException

getThing

public final XMLThing getThing()
Returns an XMLThing-representation of the path element

Returns:
XMLThing matching the path element

getGetterParameters

public java.lang.Object[] getGetterParameters()
Returns the array of parameters that the getter corresponding to thsi Path Element is supposed to take. Typically, returns null; however, doesnt have to be: consider getDescription (String language). This is the only method that can be overwritten by subclasses.

Returns: