| Package | Description |
|---|---|
| org.eigenbase.xom |
Provides an object layer for reading and writing XML documents.
|
| org.eigenbase.xom.wrappers |
Wrappers for various XML parsers.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
XOMUtil.addChild(ElementDef parent,
ElementDef child) |
static void |
XOMUtil.addChild(ElementDef parent,
NodeDef child) |
void |
ElementDef.addChild(NodeDef child) |
static void |
XOMUtil.addChildren(ElementDef parent,
NodeDef[] children)
Adds a set of children to an object, using its best guess as to where to
put them.
|
void |
ElementDef.addChildren(NodeDef[] children) |
NodeDef[] |
DOMElementParser.classArray(Class elemClass,
int min,
int max)
This function retrieves a collection of elements which are subclasses of
the given class, returning them as an array.
|
static NodeDef |
ElementDef.constructElement(DOMWrapper wrapper,
Class elemClass)
constructElement is a helper function which builds the appropriate type
of ElementDef from an XML Element.
|
static NodeDef |
ElementDef.constructElement(DOMWrapper wrapper,
Class enclosure,
String prefix)
constructElement is a helper function which builds the appropriate type
of ElementDef from an XML Element.
|
static Parser |
XOMUtil.createDefaultParser()
Creates a
Parser of the default parser type. |
ElementDef |
ElementDef.deepCopy()
Public version of clone(); returns a deep copy of this ElementDef.
|
NodeDef |
DefWalker.expect(Class elemType)
Returns the next node in the defs array, but only if it matches
the provided class elemType.
|
NodeDef[] |
DOMElementParser.getArray(Class elemClass,
int min,
int max)
This function retrieves a collection of elements which are subclasses of
the given class, returning them as an array.
|
Object |
DOMElementParser.getAttribute(String attrName,
String attrType,
String defaultValue,
String[] values,
boolean required)
Retrieve an Attribute from the parser.
|
NodeDef |
DOMElementParser.getElement(Class elementClass,
boolean required)
This function retrieves an Element from this parser, advancing the
parser if the element is found.
|
protected static ElementDef[] |
ElementDef.getElementChildren(DOMWrapper _def,
Class clazz,
String prefix) |
static Class |
ElementDef.getElementClass(DOMWrapper wrapper,
Class enclosure,
String prefix)
getElementClass is a static helper function which finds the XMLDef class
corresponding to an Element.
|
protected static NodeDef[] |
ElementDef.getMixedChildren_new(DOMWrapper _def,
Class clazz,
String prefix) |
protected static NodeDef[] |
ElementDef.getMixedChildren(DOMWrapper _def,
Class clazz,
String prefix) |
static Class |
DOMElementParser.getPluginClass(Class managerClass)
Get a Class object representing a plugin class, given a manager
class that implements the static method getXMLDefClass().
|
static Class |
DOMElementParser.getPluginClass(String packageName,
String className)
Get a Class object representing a plugin class, identified either
directly by a Java package and Java class name, or indirectly
by a Java package and Java class which defines a method called
getXMLDefClass() to return the appropriate class.
|
String |
DOMElementParser.getString(String elementName,
boolean required)
This function retrieves a String element from this parser,
advancing the parser if the element is found.
|
String[] |
DOMElementParser.getStringArray(String elemName,
int min,
int max)
This function returns a collection of String elements of the given
name, returning them as an array.
|
org.eigenbase.xom.MetaGenerator.TypeInfo |
MetaGenerator.getTypeInfo(String name,
boolean fail)
Return the TypeInfo class associated with the given name.
|
DOMWrapper[] |
DOMElementParser.optionalArray(String elemName,
int min,
int max)
This function retrieves a collection of elements with the given name,
returning them as an array.
|
String |
DOMElementParser.optionalAttribute(String attrName)
This function retrieves an optional Attribute by name from the
current Element.
|
Boolean |
DOMElementParser.optionalBooleanAttribute(String attrName)
This function retrieves an optional Attribute by name from the
current Element, converting it to an Boolean.
|
Double |
DOMElementParser.optionalDoubleAttribute(String attrName)
This function retrieves an optional Attribute by name from the
current Element, converting it to a Double.
|
DOMWrapper |
DOMElementParser.optionalElement(String elementName)
This function retrieves an optional Element from this parser,
advancing the parser if the element is found.
|
Integer |
DOMElementParser.optionalIntegerAttribute(String attrName)
This function retrieves an optional Attribute by name from the
current Element, converting it to an Integer.
|
String |
DOMElementParser.optionalString(String elementName)
This function retrieves an optional String element from this parser,
advancing the parser if the element is found.
|
DOMWrapper |
Parser.parse(InputStream is)
Parses an input stream and returns a wrapped element.
|
DOMWrapper |
Parser.parse(Reader reader)
Parses the contents of a reader and returns a wrapped element.
|
DOMWrapper |
Parser.parse(String sXml)
Parses a string and returns a wrapped element.
|
DOMWrapper |
Parser.parse(URL url)
Parses the contents of a URL and returns a wrapped element.
|
String |
DOMElementParser.requiredAttribute(String attrName)
This function retrieves a required Attribute by name from the
current Element.
|
Boolean |
DOMElementParser.requiredBooleanAttribute(String attrName)
This function retrieves an required Attribute by name from the
current Element, converting it to a Boolean.
|
NodeDef |
DOMElementParser.requiredClass(Class classTemplate)
This function retrieves a required Element of a specific class
from this parser, advancing the parser after the read.
|
static String |
DOMElementParser.requiredDefAttribute(DOMWrapper wrapper,
String attrName,
String defaultVal)
This static version of requiredAttribute uses any element definition
as a basis for the attribute.
|
DOMWrapper |
DOMElementParser.requiredElement(String elementName)
This function retrieves a required Element from this parser,
advancing the parser after the read.
|
Integer |
DOMElementParser.requiredIntegerAttribute(String attrName)
This function retrieves an required Attribute by name from the
current Element, converting it to an Integer.
|
DOMWrapper |
DOMElementParser.requiredOption(String[] elementNames)
This function retrieves a required element which may have one of a
number of names.
|
String |
DOMElementParser.requiredString(String elementName)
This function retrieves a required String element from this parser,
advancing the parser after the read.
|
void |
ElementDef.verifyEqual(ElementDef other)
Verifies that this ElementDef is equal to other, throwing a
XOMException with a lengthy explanation if equality
fails.
|
void |
MetaGenerator.writeDtd(PrintWriter out) |
void |
MetaGenerator.writeFiles(String outputDirName,
String dtdFileName)
Create all files associated with the metamodel, including a Java class
and a DTD file.
|
void |
MetaGenerator.writeJava(PrintWriter out) |
void |
MetaGenerator.writeJavaDeclareAttribute(PrintWriter out,
MetaDef.Attribute attr) |
void |
MetaGenerator.writeJavaDeclareContent(PrintWriter out,
MetaDef.Content content) |
void |
MetaGenerator.writeJavaDisplayAttribute(PrintWriter out,
MetaDef.Attribute attr) |
void |
MetaGenerator.writeJavaDisplayContent(PrintWriter out,
MetaDef.Content content) |
void |
MetaGenerator.writeJavaDisplayDiffAttribute(PrintWriter out,
int[] diffCount,
MetaDef.Attribute attr) |
void |
MetaGenerator.writeJavaDisplayDiffContent(PrintWriter out,
int[] diffCount,
MetaDef.Content content) |
void |
MetaGenerator.writeJavaDisplayXMLAttribute(PrintWriter out,
MetaDef.Attribute attr) |
void |
MetaGenerator.writeJavaDisplayXMLContent(PrintWriter out,
MetaDef.Content content) |
void |
MetaGenerator.writeJavaGetAttribute(PrintWriter out,
MetaDef.Attribute attr) |
void |
MetaGenerator.writeJavaGetContent(PrintWriter out,
MetaDef.Content content) |
| Constructor and Description |
|---|
Any(DOMWrapper _def) |
Array(DOMWrapper _def) |
Attribute(DOMWrapper _def) |
CData(DOMWrapper _def) |
CdataDef(DOMWrapper _def) |
Class(DOMWrapper _def) |
CommentDef(DOMWrapper _def) |
DOMElementParser(DOMWrapper wrapper,
String prefix,
Class enclosure)
Constructs a new ElementParser based on an Element of the XML parse
tree wrapped in a DOMWrapper, and a prefix (to be applied to all element
tags except the root), and the name of the enclosing class.
|
Element(DOMWrapper _def) |
Import(DOMWrapper _def) |
MetaGenerator(String xmlFile,
boolean testMode)
Construct a MetaGenerator from an XML file.
|
MetaGenerator(String xmlFile,
boolean testMode,
String className) |
Model(DOMWrapper _def) |
Object(DOMWrapper _def) |
Plugin(DOMWrapper _def) |
StringElement(DOMWrapper _def) |
TextDef(DOMWrapper _def) |
| Modifier and Type | Method and Description |
|---|---|
protected Document |
JaxpDOMParser.parseInputSource(InputSource in) |
protected Document |
XercesDOMParser.parseInputSource(InputSource in) |
| Constructor and Description |
|---|
JaxpDOMParser()
Creates a non-validating parser.
|
JaxpDOMParser(boolean validating)
Creates a parser.
|
XercesDOMParser()
Constructs a non-validating Xerces DOM Parser.
|
XercesDOMParser(boolean validate)
Constructs a Xerces DOM Parser.
|
Copyright © 2012–2022 Julian Hyde. All rights reserved.