|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdsql.DMExecuted
dsql.value.Value
dsql.value.NonScalarValue
dsql.value.XmlDataValue
Access to XML structures. External files are read progressively and "on demand", i.e. whenever a "column" is requested the file is read until a matching element is found.
Field Summary | |
protected ASTXMLElement |
buffer
A buffer to some or all XML elements |
protected ASTXMLElement |
dataEle
The original <data> element. |
protected boolean |
external
true if data is read from an external file |
protected java.lang.String |
fileName
the external file name, or "inline" |
protected Parser |
parser
the parser for external file |
protected boolean |
readColumnFromFile
If true, read and parse more columns from external file. |
protected XmlRecordHolder |
recordHolder
keeps track of record holders, so that we don't reparse documents if user writes $x[0], $x[1] |
Constructor Summary | |
XmlDataValue()
constructor invoked by ASTValue |
|
XmlDataValue(ASTXMLElement _ele)
|
Method Summary | |
protected boolean |
allowDSQL()
|
boolean |
equals(java.lang.Object obj)
|
boolean |
getBoolean()
|
java.lang.Object |
getColumn(int col)
|
java.lang.Object |
getColumn(java.lang.String name)
|
int |
getColumnCount()
|
protected int |
getColumnIndex(int col)
|
java.lang.String |
getColumnLabel(int col)
|
java.lang.String |
getColumnString(int col)
|
java.lang.String |
getColumnString(java.lang.String name)
|
java.lang.Object |
getField(int i)
Access an element |
java.lang.Object |
getField(java.lang.String name)
Access an element |
ConstructedResults |
getMeta()
|
RecordHolder |
getRecordHolder()
XmlDataValue uses this
to provide an iterator for XML documents |
java.lang.String |
getString()
|
protected ASTXMLElement |
getXmlData()
|
ASTXMLElement |
getXmlData(boolean full)
|
protected void |
initParser()
Initialise parser and loads document header |
protected ASTXMLElement |
parseNext()
Parse next element. |
protected ASTXMLElement |
parseNextColumn()
Parse next column and add it to buffer |
void |
print(ASTPrint printer)
Print this value using printer |
void |
setContents(ASTXMLElement ele)
Inline |
void |
setContents(java.lang.String _fileName,
ASTXMLElement ele)
This method sets up but do not open the file for parsing. |
java.lang.Object |
setField(int i,
Value val)
|
Methods inherited from class dsql.value.NonScalarValue |
getFields, isScalar, setField |
Methods inherited from class dsql.value.Value |
getFloat, getInt, getObject, getObjectClass, getType, getValue, getValue |
Methods inherited from class dsql.DMExecuted |
getCaller, setCaller |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ASTXMLElement dataEle
protected ASTXMLElement buffer
protected boolean readColumnFromFile
protected Parser parser
protected java.lang.String fileName
protected boolean external
protected XmlRecordHolder recordHolder
Constructor Detail |
public XmlDataValue()
public XmlDataValue(ASTXMLElement _ele) throws ExecuteException
Method Detail |
public RecordHolder getRecordHolder() throws ExecuteException
Value
XmlDataValue
uses this
to provide an iterator for XML documents
getRecordHolder
in class Value
ExecuteException
protected ASTXMLElement parseNext() throws ExecuteException
ExecuteException
protected ASTXMLElement parseNextColumn() throws ExecuteException
ExecuteException
protected void initParser() throws ExecuteException
ExecuteException
protected ASTXMLElement getXmlData() throws ExecuteException
ExecuteException
public ASTXMLElement getXmlData(boolean full) throws ExecuteException
ExecuteException
public boolean equals(java.lang.Object obj)
protected boolean allowDSQL()
public void setContents(ASTXMLElement ele) throws ExecuteException
setContents
in interface DataValue
ExecuteException
public void setContents(java.lang.String _fileName, ASTXMLElement ele) throws ExecuteException
setContents
in interface DataValue
ExecuteException
public ConstructedResults getMeta() throws ExecuteException
getMeta
in class Value
ExecuteException
public boolean getBoolean() throws ExecuteException
getBoolean
in class Value
ExecuteException
public java.lang.String getString() throws ExecuteException
getString
in class Value
ExecuteException
public void print(ASTPrint printer) throws ExecuteException
Value
print
in class Value
ExecuteException
public java.lang.Object getField(java.lang.String name) throws ExecuteException
getField
in class NonScalarValue
ExecuteException
public java.lang.Object getField(int i) throws ExecuteException
getField
in interface DotAt
ExecuteException
public java.lang.Object setField(int i, Value val) throws ExecuteException
setField
in interface DotAt
ExecuteException
public java.lang.String getColumnLabel(int col) throws ExecuteException
ExecuteException
public int getColumnCount() throws ExecuteException
ExecuteException
public java.lang.Object getColumn(int col) throws ExecuteException
ExecuteException
public java.lang.String getColumnString(int col) throws ExecuteException
ExecuteException
public java.lang.Object getColumn(java.lang.String name) throws ExecuteException
ExecuteException
public java.lang.String getColumnString(java.lang.String name) throws ExecuteException
ExecuteException
protected int getColumnIndex(int col) throws ExecuteException
ExecuteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |