org.pentaho.di.trans.steps.xmlinputsax
Class XMLInputSaxFieldPosition

java.lang.Object
  extended by org.pentaho.di.trans.steps.xmlinputsax.XMLInputSaxFieldPosition

public class XMLInputSaxFieldPosition
extends Object


Field Summary
static String ATT_MARKER
           
static String NR_MARKER
           
static int XML_ATTRIBUTE
           
static int XML_ELEMENT_ATT
           
static int XML_ELEMENT_POS
           
 
Constructor Summary
XMLInputSaxFieldPosition(String encoded)
          Construnct a new XMLFieldPosition based on an a code: E=Elementame, A=Attributename
XMLInputSaxFieldPosition(String name, int type)
          Create a new XML Input Field position.
XMLInputSaxFieldPosition(String name, int type, int elementNr)
          Create a new XML Input Field position.
XMLInputSaxFieldPosition(String name, String attribute, String value)
           
 
Method Summary
 Object clone()
           
static String encodePath(List<XMLInputSaxFieldPosition> path)
          Encode the path to an XML element or attribute
 String getAttribute()
           
 String getAttributeValue()
           
 int getElementNr()
           
 String getName()
           
 int getType()
           
 void setElementNr(int elementNr)
           
 void setName(String name)
           
 void setType(int type)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

XML_ELEMENT_POS

public static final int XML_ELEMENT_POS
See Also:
Constant Field Values

XML_ELEMENT_ATT

public static final int XML_ELEMENT_ATT
See Also:
Constant Field Values

XML_ATTRIBUTE

public static final int XML_ATTRIBUTE
See Also:
Constant Field Values

NR_MARKER

public static final String NR_MARKER
See Also:
Constant Field Values

ATT_MARKER

public static final String ATT_MARKER
See Also:
Constant Field Values
Constructor Detail

XMLInputSaxFieldPosition

public XMLInputSaxFieldPosition(String name,
                                int type)
                         throws KettleValueException
Create a new XML Input Field position.

Parameters:
name - the name of the element or attribute
type - Element or Attribute (XML_ELEMENT, XML_ATTRIBUTE)
Throws:
KettleValueException

XMLInputSaxFieldPosition

public XMLInputSaxFieldPosition(String name,
                                int type,
                                int elementNr)
                         throws KettleValueException
Create a new XML Input Field position.

Parameters:
name - the name of the element or attribute
type - Element or Attribute (XML_ELEMENT, XML_ATTRIBUTE)
elementNr - the element number to pick.
Throws:
KettleValueException

XMLInputSaxFieldPosition

public XMLInputSaxFieldPosition(String name,
                                String attribute,
                                String value)

XMLInputSaxFieldPosition

public XMLInputSaxFieldPosition(String encoded)
                         throws KettleValueException
Construnct a new XMLFieldPosition based on an a code: E=Elementame, A=Attributename

Parameters:
encoded -
Throws:
KettleValueException
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getName

public String getName()
Returns:
Returns the name.

setName

public void setName(String name)
Parameters:
name - The name to set.

getType

public int getType()
Returns:
Returns the type.

setType

public void setType(int type)
Parameters:
type - The type to set.

getAttribute

public String getAttribute()

getAttributeValue

public String getAttributeValue()

clone

public Object clone()
Overrides:
clone in class Object

getElementNr

public int getElementNr()
Returns:
Returns the elementNr.

setElementNr

public void setElementNr(int elementNr)
Parameters:
elementNr - The elementNr to set.

encodePath

public static final String encodePath(List<XMLInputSaxFieldPosition> path)
Encode the path to an XML element or attribute

Parameters:
path - An ArrayList of XMLInputFieldPosition
Returns:
the path encoded