Package org.locationtech.jts.jump.io
Class ColumnDescription
- java.lang.Object
-
- org.locationtech.jts.jump.io.ColumnDescription
-
-
Field Summary
Fields Modifier and Type Field Description static int
VALUE_IS_ATT
static int
VALUE_IS_BODY
-
Constructor Summary
Constructors Constructor Description ColumnDescription()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeType
getType()
Returns the [JCS] type of this column cf.int
match(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_ATTRIBUTEvoid
setColumnName(String colname)
Set the name of this column.void
setTagAttribute(String attName)
Sets the name of the attribute (with no value) that the xml tag that this column will be extracted from.void
setTagAttribute(String attName, String attValue)
Sets the name of the attribute (and its value) that the xml tag that this column will be extracted from.void
setTagName(String tagname)
Sets the name of the XML tag that this column will be extracted from.void
setType(AttributeType t)
Sets the [JCS] type of this columnvoid
setValueAttribute(String attName)
Sets the name of the attribute that the actual column's value will be found.
-
-
-
Field Detail
-
VALUE_IS_BODY
public static final int VALUE_IS_BODY
- See Also:
- Constant Field Values
-
VALUE_IS_ATT
public static final int VALUE_IS_ATT
- See Also:
- Constant Field Values
-
-
Method Detail
-
setType
public void setType(AttributeType t)
Sets the [JCS] type of this column- Parameters:
t
- JCS type that this column will contain (null means 'STRING')
-
getType
public AttributeType getType()
Returns the [JCS] type of this column cf. setType()
-
setColumnName
public void setColumnName(String colname)
Set the name of this column.- Parameters:
colname
- name of the column
-
setTagName
public void setTagName(String tagname)
Sets the name of the XML tag that this column will be extracted from.- Parameters:
tagname
- name of the XML tag
-
setTagAttribute
public void setTagAttribute(String attName, String attValue)
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
public void setTagAttribute(String attName)
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
public void setValueAttribute(String attName)
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
public int match(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_ATTRIBUTE- Parameters:
XMLtagName
- name of the xml tagxmlAtts
- list of the xml attributes for the tag (cf. xerces or SAX)
-
-