public class ColumnDescription
extends java.lang.Object
GMLReader). | Modifier and Type | Field and Description |
|---|---|
static int |
VALUE_IS_ATT |
static int |
VALUE_IS_BODY |
| Constructor and Description |
|---|
ColumnDescription() |
| Modifier and Type | Method and Description |
|---|---|
AttributeType |
getType()
Returns the [JCS] type of this column
cf. setType()
|
int |
match(java.lang.String XMLtagName,
org.xml.sax.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 |
void |
setColumnName(java.lang.String colname)
Set the name of this column.
|
void |
setTagAttribute(java.lang.String attName)
Sets the name of the attribute (with no value) that the xml tag that this column will be extracted from.
|
void |
setTagAttribute(java.lang.String attName,
java.lang.String attValue)
Sets the name of the attribute (and its value) that the xml tag that this column will be extracted from.
|
void |
setTagName(java.lang.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 column
|
void |
setValueAttribute(java.lang.String attName)
Sets the name of the attribute that the actual column's value will be found.
|
public static final int VALUE_IS_BODY
public static final int VALUE_IS_ATT
public void setType(AttributeType t)
t - JCS type that this column will contain (null means 'STRING')public AttributeType getType()
public void setColumnName(java.lang.String colname)
colname - name of the columnpublic void setTagName(java.lang.String tagname)
tagname - name of the XML tagpublic void setTagAttribute(java.lang.String attName,
java.lang.String attValue)
For example, the XML '<value type=name> DAVE </value>' would described by:
setTagName('value');
setTagAttribute('type','name');
attName - name of the XML attribute nameattValue - its valuepublic void setTagAttribute(java.lang.String attName)
For example, the XML '<value name=david></value>' would described by:
setTagName('value');
setTagAttribute('name');
attName - name of the XML attribute namepublic void setValueAttribute(java.lang.String attName)
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.attName - name of the attribute that the column's value will be extracted frompublic int match(java.lang.String XMLtagName,
org.xml.sax.Attributes xmlAtts)
XMLtagName - name of the xml tagxmlAtts - list of the xml attributes for the tag (cf. xerces or SAX)