Class ColumnDescription
java.lang.Object
com.vividsolutions.jump.io.ColumnDescription
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetType()Returns the [JCS] type of this column cf. setType()intmatch(String XMLtagName, Attributes xmlAtts) Given an xml tag (its name and attributes), see if it matches this column description
If it doesnt, return 0
If it does, return either VALUE_IS_BODY or VALUE_IS_ATTRIBUTEvoidsetColumnName(String colname) Set the name of this column.voidsetTagAttribute(String attName) Sets the name of the attribute (with no value) that the xml tag that this column will be extracted from.voidsetTagAttribute(String attName, String attValue) Sets the name of the attribute (and its value) that the xml tag that this column will be extracted from.voidsetTagName(String tagname) Sets the name of the XML tag that this column will be extracted from.voidSets the [JCS] type of this columnvoidsetValueAttribute(String attName) Sets the name of the attribute that the actual column's value will be found.
-
Constructor Details
-
ColumnDescription
public ColumnDescription()
-
-
Method Details
-
setType
Sets the [JCS] type of this column- Parameters:
t- JCS type that this column will contain (null means 'STRING')
-
getType
Returns the [JCS] type of this column cf. setType() -
setColumnName
Set the name of this column.- Parameters:
colname- name of the column
-
setTagName
Sets the name of the XML tag that this column will be extracted from.- Parameters:
tagname- name of the XML tag
-
setTagAttribute
Sets the name of the attribute (and its value) that the xml tag that this column will be extracted from.For example, the XML '<value type=name> DAVE </value>' would described by: setTagName('value'); setTagAttribute('type','name');- Parameters:
attName- name of the XML attribute nameattValue- its value
-
setTagAttribute
Sets the name of the attribute (with no value) that the xml tag that this column will be extracted from.For example, the XML '<value name=david></value>' would described by: setTagName('value'); setTagAttribute('name');- Parameters:
attName- name of the XML attribute name
-
setValueAttribute
Sets the name of the attribute that the actual column's value will be found.For example, the XML '<value name=david></value>' would described by: setTagName('value'); setTagAttribute('name'); setValueAttribute('name');NOTE: not calling this function will mean to get the column's value from the BODY of the tag.- Parameters:
attName- name of the attribute that the column's value will be extracted from
-
match
Given an xml tag (its name and attributes), see if it matches this column description
If it doesnt, return 0
If it does, return either VALUE_IS_BODY or VALUE_IS_ATTRIBUTE- Parameters:
XMLtagName- name of the xml tagxmlAtts- list of the xml attributes for the tag (cf. xerces or SAX)
-