| java.lang.Object com.vividsolutions.jump.io.ColumnDescription
ColumnDescription | public class ColumnDescription (Code) | | This is a helper class to store information about a JCS Column for the GML Parser (
GMLReader ).
Also has a function for checking if an XML tag matches this column specification.
|
Method Summary | |
public AttributeType | getType() Returns the [JCS] type of this column
cf. | int | lookupAttribute(Attributes atts, String att_name) Given a set of XML attributes associated with an XML tag, find the index of
a given attribute in a case insensitive way.
This is the case insensitive version of the standard function. | 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 tag Parameters: xmlAtts - list of the xml attributes for the tag (cf. | public void | setColumnName(String colname) Set the name of this column. | 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. | 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. | public void | setTagName(String tagname) Sets the name of the XML tag that this column will be extracted from. | public void | setType(AttributeType t) | public void | setValueAttribute(String attName) Sets the name of the attribute that the actual column's value will be found. |
VALUE_IS_ATT | final public static int VALUE_IS_ATT(Code) | | |
VALUE_IS_BODY | final public static int VALUE_IS_BODY(Code) | | |
tagAttributeNeedsValue | boolean tagAttributeNeedsValue(Code) | | |
tagNeedsAttribute | boolean tagNeedsAttribute(Code) | | |
ColumnDescription | public ColumnDescription()(Code) | | |
getType | public AttributeType getType()(Code) | | Returns the [JCS] type of this column
cf. setType()
|
lookupAttribute | int lookupAttribute(Attributes atts, String att_name)(Code) | | Given a set of XML attributes associated with an XML tag, find the index of
a given attribute in a case insensitive way.
This is the case insensitive version of the standard function. Returns -1 if
the attribute cannot be found
Parameters: atts - XML attributes for a tag Parameters: att_name - name of the attribute |
match | public int match(String XMLtagName, Attributes xmlAtts)(Code) | | 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 tag Parameters: xmlAtts - list of the xml attributes for the tag (cf. xerces or SAX) |
setColumnName | public void setColumnName(String colname)(Code) | | Set the name of this column.
Parameters: colname - name of the column |
setTagAttribute | public void setTagAttribute(String attName, String attValue)(Code) | | 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 name Parameters: attValue - its value |
setTagAttribute | public void setTagAttribute(String attName)(Code) | | 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 |
setTagName | public void setTagName(String tagname)(Code) | | Sets the name of the XML tag that this column will be extracted from.
Parameters: tagname - name of the XML tag |
setType | public void setType(AttributeType t)(Code) | | Sets the [JCS] type of this column
Parameters: t - JCS type that this column will contain (null means 'STRING') |
setValueAttribute | public void setValueAttribute(String attName)(Code) | | 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 |
|
|