|
TPTP 4.5.0 Platform Project Internal API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.tptp.platform.report.extension.internal.DExtensible
org.eclipse.tptp.platform.report.tools.internal.DParser
org.eclipse.tptp.platform.report.drivers.xml.internal.DXmlDocumentReader
org.eclipse.tptp.platform.report.birt).
public class DXmlDocumentReader
DXmlReader is an extensible class that parse an InputStream and a XML stream
to build a jscrib IDItem tree and associated registries (colors,fonts and styles).
The following example reads a document from the xml file named 'myfile.rxml'.
DXmlReader reader = new DXmlReader();
try{
IDObject [] docs = reader.read( new FileInputStream("rxml") );
// returns only the first document.
if (docs.lenght>0 && (docs[0] instanceof DDocument)
return (DDocument)docs[0];
}
catch(Exception e)
{
// an error occurs during the file parsing.
...
}
read(java.io.InputStream),
DExtensible,
IReader,
InputStream| Nested Class Summary | |
|---|---|
static class |
DXmlDocumentReader.Arg
Deprecated. Argument class for doMethod(), and instance of Arg class will be given as the third parameter. |
| Nested classes/interfaces inherited from class org.eclipse.tptp.platform.report.tools.internal.DParser |
|---|
DParser.ParserException |
| Nested classes/interfaces inherited from class org.eclipse.tptp.platform.report.extension.internal.DExtensible |
|---|
DExtensible.InvokeMethod |
| Field Summary |
|---|
| Fields inherited from class org.eclipse.tptp.platform.report.extension.internal.DExtensible |
|---|
mapMethod, paramTab |
| Constructor Summary | |
|---|---|
DXmlDocumentReader(IXmlParser parser)
Deprecated. Create a DXmlReader, ready to parse input @see read(InputStream) |
|
| Method Summary | |
|---|---|
void |
clear()
Deprecated. Clears the previous parsing internal datas |
protected IDItem |
createFromClass(java.lang.String class_name)
Deprecated. |
protected IDItem |
createIDItemForNode(org.w3c.dom.Node node)
Deprecated. Create a IDItem instance from given str. |
protected java.lang.Object |
createObjectForClassName(java.lang.String class_name,
org.w3c.dom.Node node)
Deprecated. Create an object for class name using node data. |
static java.lang.String |
decode(java.lang.String s)
Deprecated. Replace few xml entity '&xxx;' to their char value in string. |
static IDColor |
DecodeColor(java.lang.String s)
Deprecated. decode 6 hexa-digit string RRGGBB into a IDColor |
void |
doChildrenItem(IDItem parent,
DExtensible ext,
java.lang.Object a_arg)
Deprecated. invokeDoMethod() for all node contained in arg (@see class Arg), that aren't filtered (@see Arg class again). |
void |
doMethod(DAlignmentPair align,
DExtensible ext,
java.lang.Object t_arg)
Deprecated. configure a String using node text as string |
void |
doMethod(java.util.Date date,
DExtensible ext,
java.lang.Object t_arg)
Deprecated. configure a Data using node text as setTime() |
void |
doMethod(DAxis ax,
DExtensible ext,
java.lang.Object the_arg)
Deprecated. configure a DAxis |
void |
doMethod(DCategory cat,
DExtensible ext,
java.lang.Object arg)
Deprecated. parses common attribute for 'category' node |
void |
doMethod(DCurve curv,
DExtensible ext,
java.lang.Object a_arg)
Deprecated. configure a DCurve and its children |
void |
doMethod(DGraphic graph,
DExtensible ext,
java.lang.Object the_arg)
Deprecated. configure a DGraphic and it children |
void |
doMethod(DMarkerLine ml,
DExtensible ext,
java.lang.Object the_arg)
Deprecated. parses 'markerLine' element |
void |
doMethod(DMarkerRegion mr,
DExtensible ext,
java.lang.Object the_arg)
Deprecated. parses 'markerRegion' element |
void |
doMethod(DPalettes pal,
DExtensible ext,
java.lang.Object the_arg)
Deprecated. parses 'palettes' element |
void |
doMethod(DPoint pnt,
DExtensible ext,
java.lang.Object arg)
Deprecated. configure a DPoint and it children |
void |
doMethod(IDCoord coord,
DExtensible ext,
java.lang.Object a_arg)
Deprecated. configure a DCoord |
void |
doMethod(IDStringSerializable v,
DExtensible ext,
java.lang.Object arg)
Deprecated. doMethod() for a IDStringSerializable instance, call fromString() on this object |
void |
doMethod(IDXmlSerializable v,
DExtensible ext,
java.lang.Object arg)
Deprecated. doMethod() for a IDXmlSerializable instance, call readXml() on this object |
void |
doMethod(java.lang.String date,
DExtensible ext,
java.lang.Object t_arg)
Deprecated. configure a String using node text as string |
DColorRegistry |
getColorRegistry()
Deprecated. Returns the colors which has been loaded by the reader. |
IDObject[] |
getDocuments()
Deprecated. Get a list of document objects that were read in. |
DFontRegistry |
getFontRegistry()
Deprecated. Returns the fonts which has been loaded by the reader. |
static java.lang.String |
getNodeText(org.w3c.dom.Node node)
Deprecated. |
protected org.w3c.dom.Node |
getRequiredAttribut(org.w3c.dom.NamedNodeMap attr,
java.lang.String attr_tag,
java.lang.String elt_tag)
Deprecated. Check if attribute attr_tag is defined in attribute map attr. |
DStyleRegistry |
getStyleRegistry()
Deprecated. Returns the styles which has been loaded by the reader. |
IDObject[] |
getStyles()
Deprecated. Get a list of style objects that were read in. |
protected void |
parseAxes(DGraphic graph,
DExtensible ext,
java.lang.Object the_arg)
Deprecated. parses 'axes' item |
protected void |
parseCategories(DAxis ax,
DExtensible ext,
java.lang.Object the_arg)
Deprecated. parses 'categories' element |
protected void |
parseChartTitle(DGraphic g,
DExtensible ext,
java.lang.Object the_arg)
Deprecated. parses 'chartTitle' element |
protected void |
parseCurves(DGraphic graph,
DExtensible ext,
java.lang.Object the_arg)
Deprecated. parses 'curves' item |
protected void |
parseLabelFormat(DAxis ax,
DExtensible ext,
java.lang.Object a_arg)
Deprecated. parses 'labelFormat' element |
protected void |
parseLegend(DGraphic g,
DExtensible ext,
java.lang.Object the_arg)
Deprecated. parses 'legend' element |
protected void |
parseMajorUnit(DAxis ax,
DExtensible ext,
java.lang.Object a_arg)
Deprecated. parses 'majorUnit' element |
protected void |
parseMinorUnit(DAxis ax,
DExtensible ext,
java.lang.Object a_arg)
Deprecated. parses 'minorUnit' element |
protected void |
parsePlotArea(DGraphic g,
DExtensible ext,
java.lang.Object the_arg)
Deprecated. parses 'plotArea' element |
IDObject[] |
read(org.w3c.dom.Document in)
Deprecated. reads a document directly form a DOM |
IDObject[] |
read(org.xml.sax.InputSource is)
Deprecated. |
IDObject[] |
read(java.io.InputStream in)
Deprecated. Parse input stream building one or more documents updating colors,fonts and styles registry (@see getStyleRegistry()). |
org.w3c.dom.Document |
readDOM(org.xml.sax.InputSource is)
Deprecated. This is a convience method that reads in an input source that contains an xml input and return a DOM model. |
org.w3c.dom.Document |
readDOM(java.io.InputStream in)
Deprecated. This is a convience method that reads in an input stream that contains an xml input and return a DOM model. |
void |
setColorRegistry(DColorRegistry r)
Deprecated. override current color registry using the new one |
void |
setFontRegistry(DFontRegistry r)
Deprecated. override current font registry using the new one |
void |
setStyleRegistry(DStyleRegistry r)
Deprecated. override current style registry using the new one |
void |
updateExtension(IDExtension ext,
java.lang.Class for_extension)
Deprecated. This method is public due to Signal connection, but must not be called directly. |
| Methods inherited from class org.eclipse.tptp.platform.report.tools.internal.DParser |
|---|
doMethod, doMethod, doMethod, getListLevel, getTitleLevel |
| Methods inherited from class org.eclipse.tptp.platform.report.extension.internal.DExtensible |
|---|
doMethod, getDoMethod, installDoMethod, installDoMethods, installDoMethods, invokeDoMethod, invokeSuperDoMethod, removeDoMethod, removeDoMethod, removeDoMethods, removeDoMethods, resolveDoMethod |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DXmlDocumentReader(IXmlParser parser)
| Method Detail |
|---|
public DColorRegistry getColorRegistry()
IReader
getColorRegistry in interface IReaderpublic DFontRegistry getFontRegistry()
IReader
getFontRegistry in interface IReaderpublic DStyleRegistry getStyleRegistry()
IReader
getStyleRegistry in interface IReaderpublic void setColorRegistry(DColorRegistry r)
setColorRegistry in interface IReaderpublic void setFontRegistry(DFontRegistry r)
setFontRegistry in interface IReaderpublic void setStyleRegistry(DStyleRegistry r)
setStyleRegistry in interface IReaderpublic void clear()
DParser
clear in interface IReaderclear in class DParserpublic IDObject[] read(java.io.InputStream in)
read in interface IDocumentReaderread in interface IReaderin - input stream to use for xml input.
various - exception (ie java.lang.IOException), or DXmlErrorpublic org.w3c.dom.Document readDOM(java.io.InputStream in)
in - input stream to use for xml input.
various - exception (ie java.lang.IOException), or DXmlErrorpublic org.w3c.dom.Document readDOM(org.xml.sax.InputSource is)
in - input source to use for xml input.
various - exception (ie java.lang.IOException), or DXmlErrorpublic IDObject[] read(org.xml.sax.InputSource is)
public IDObject[] read(org.w3c.dom.Document in)
read in interface IDocumentReaderpublic static java.lang.String decode(java.lang.String s)
protected org.w3c.dom.Node getRequiredAttribut(org.w3c.dom.NamedNodeMap attr,
java.lang.String attr_tag,
java.lang.String elt_tag)
DXmlError - if attribute attr_tag is not found in node map attr.public static java.lang.String getNodeText(org.w3c.dom.Node node)
protected IDItem createIDItemForNode(org.w3c.dom.Node node)
str - the node name to use to create IDItem instance.ext - a DXmlReader.o_arg - a CreateIDItemArg instance.
protected IDItem createFromClass(java.lang.String class_name)
public void doChildrenItem(IDItem parent,
DExtensible ext,
java.lang.Object a_arg)
doChildrenItem in class DParser
public void doMethod(DGraphic graph,
DExtensible ext,
java.lang.Object the_arg)
protected void parseLegend(DGraphic g,
DExtensible ext,
java.lang.Object the_arg)
public void doMethod(DCategory cat,
DExtensible ext,
java.lang.Object arg)
protected void parseChartTitle(DGraphic g,
DExtensible ext,
java.lang.Object the_arg)
protected void parsePlotArea(DGraphic g,
DExtensible ext,
java.lang.Object the_arg)
protected void parseCurves(DGraphic graph,
DExtensible ext,
java.lang.Object the_arg)
protected void parseAxes(DGraphic graph,
DExtensible ext,
java.lang.Object the_arg)
public void doMethod(DPalettes pal,
DExtensible ext,
java.lang.Object the_arg)
public void doMethod(DAxis ax,
DExtensible ext,
java.lang.Object the_arg)
public void doMethod(DMarkerLine ml,
DExtensible ext,
java.lang.Object the_arg)
public void doMethod(DMarkerRegion mr,
DExtensible ext,
java.lang.Object the_arg)
protected void parseCategories(DAxis ax,
DExtensible ext,
java.lang.Object the_arg)
protected void parseMajorUnit(DAxis ax,
DExtensible ext,
java.lang.Object a_arg)
protected void parseMinorUnit(DAxis ax,
DExtensible ext,
java.lang.Object a_arg)
protected void parseLabelFormat(DAxis ax,
DExtensible ext,
java.lang.Object a_arg)
public void doMethod(DCurve curv,
DExtensible ext,
java.lang.Object a_arg)
public void doMethod(DPoint pnt,
DExtensible ext,
java.lang.Object arg)
public void doMethod(IDCoord coord,
DExtensible ext,
java.lang.Object a_arg)
public void doMethod(java.util.Date date,
DExtensible ext,
java.lang.Object t_arg)
public void doMethod(java.lang.String date,
DExtensible ext,
java.lang.Object t_arg)
public void doMethod(DAlignmentPair align,
DExtensible ext,
java.lang.Object t_arg)
protected java.lang.Object createObjectForClassName(java.lang.String class_name,
org.w3c.dom.Node node)
public void doMethod(IDXmlSerializable v,
DExtensible ext,
java.lang.Object arg)
public void doMethod(IDStringSerializable v,
DExtensible ext,
java.lang.Object arg)
public void updateExtension(IDExtension ext,
java.lang.Class for_extension)
public static IDColor DecodeColor(java.lang.String s)
public IDObject[] getDocuments()
IDocumentReader
getDocuments in interface IDocumentReaderorg.eclipse.tptp.platform.report.core.IDocumentReader#getDocuments()public IDObject[] getStyles()
IDocumentReader
getStyles in interface IDocumentReaderorg.eclipse.tptp.platform.report.core.IDocumentReader#getStyles()
|
TPTP 4.5.0 Platform Project Internal API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||