|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.data.XDataSource
public class XDataSource
Loads a model from a reader
Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
$Revision: 2.11 $
| Field Summary | |
|---|---|
protected XProject |
currentProject
The current XProject |
| Constructor Summary | |
|---|---|
XDataSource(XProject project)
Create a new data source |
|
| Method Summary | |
|---|---|
void |
loadTable(XmlElement source,
XModel model)
Recursively load the model data |
void |
outputModel(java.lang.String filename,
XModel model)
Iterate the XModels and outputs the Elements and their attributes. |
static void |
outputModel(java.io.Writer w,
XModel model)
Iterates the XModels and outputs the Elements and their attributes. |
static void |
outputModel(XmlElement parentEle,
XModel model)
Recursive method which builds up the XML Document based on the XModel. |
void |
read(java.io.Reader r)
Read a model from the Reader |
void |
read(XmlElement ele)
Read an file pointed to by an element in the XML description of the data sources |
protected void |
readDataSource(java.lang.String fileName,
XmlElement source)
Read the data source file. |
static void |
setUseValueAsId(boolean state)
Set the model to use the value as the ID for a node if the ID is not specified |
void |
write(java.io.Writer w)
Outputs the datasource as XML |
void |
write(java.io.Writer w,
XModel model)
Outputs the datasource as XML |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected XProject currentProject
| Constructor Detail |
|---|
public XDataSource(XProject project)
project - the owner project| Method Detail |
|---|
public void read(java.io.Reader r)
r - the Readerpublic void read(XmlElement ele)
ele - the individual data source description
protected void readDataSource(java.lang.String fileName,
XmlElement source)
fileName - the nam eof the file to opensource - the XML element describing the source
public void loadTable(XmlElement source,
XModel model)
source - the source elementmodel - the model for the source elementpublic void write(java.io.Writer w)
w - The Writer of the file.
public void write(java.io.Writer w,
XModel model)
model - the model node to writew - The Writer of the file.
public static void outputModel(java.io.Writer w,
XModel model)
w - the output writermodel - the model to write
public static void outputModel(XmlElement parentEle,
XModel model)
parentEle - the current parent elementmodel - the current model being processed
public void outputModel(java.lang.String filename,
XModel model)
filename - the file to writemodel - the model to writepublic static void setUseValueAsId(boolean state)
state - true to use the value when an ID is not specified
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||