public class BeanGraph extends Object implements CommonBean
| Modifier and Type | Class and Description |
|---|---|
protected static class |
BeanGraph.ReadState |
static class |
BeanGraph.ValidateException |
| Modifier and Type | Field and Description |
|---|---|
static String |
SCHEMA_TYPE_MAPPING |
| Constructor and Description |
|---|
BeanGraph()
Normal starting point constructor.
|
BeanGraph(BeanGraph source)
Deep copy
|
BeanGraph(BeanGraph source,
boolean justData)
Deep copy
|
| Modifier and Type | Method and Description |
|---|---|
String |
_getSchemaLocation() |
void |
_setSchemaLocation(String location) |
int |
addSchemaTypeMapping(SchemaTypeMappingType value) |
void |
changePropertyByName(String name,
Object value) |
CommonBean[] |
childBeans(boolean recursive)
Return an array of all of the properties that are beans and are set.
|
void |
childBeans(boolean recursive,
List beans)
Put all child beans into the beans list.
|
boolean |
equals(BeanGraph inst) |
boolean |
equals(Object o) |
Object |
fetchPropertyByName(String name) |
List |
fetchSchemaTypeMappingList() |
SchemaTypeMappingType[] |
getSchemaTypeMapping() |
SchemaTypeMappingType |
getSchemaTypeMapping(int index) |
int |
hashCode() |
String |
nameChild(Object childObj) |
String |
nameChild(Object childObj,
boolean returnConstName,
boolean returnSchemaName) |
String |
nameChild(Object childObj,
boolean returnConstName,
boolean returnSchemaName,
boolean returnXPathName) |
String |
nameSelf() |
SchemaTypeMappingType |
newSchemaTypeMappingType()
Create a new bean using it's default constructor.
|
SchemaTypeMappingType |
newSchemaTypeMappingType(SchemaTypeMappingType source,
boolean justData)
Create a new bean, copying from another one.
|
static BeanGraph |
read(Document document) |
static BeanGraph |
read(File f) |
static BeanGraph |
read(InputSource in,
boolean validate,
EntityResolver er,
ErrorHandler eh) |
static BeanGraph |
read(InputStream in) |
protected void |
readFromDocument(Document document) |
void |
readNode(Node node) |
void |
readNode(Node node,
Map namespacePrefixes) |
protected void |
readNodeAttributes(Node node,
Map namespacePrefixes,
NamedNodeMap attrs) |
protected boolean |
readNodeChild(Node childNode,
String childNodeName,
String childNodeValue,
Map namespacePrefixes) |
protected void |
readNodeChildren(Node node,
Map namespacePrefixes) |
static BeanGraph |
readNoEntityResolver(InputStream in)
Warning: in readNoEntityResolver character and entity references will
not be read from any DTD in the XML source.
|
int |
removeSchemaTypeMapping(SchemaTypeMappingType value)
Search from the end looking for @param value, and then remove it.
|
void |
setSchemaTypeMapping(int index,
SchemaTypeMappingType value) |
void |
setSchemaTypeMapping(SchemaTypeMappingType[] value) |
int |
sizeSchemaTypeMapping() |
String |
toString() |
void |
validate() |
void |
write(File f) |
void |
write(OutputStream out) |
void |
write(OutputStream out,
String encoding) |
void |
write(Writer out,
String encoding)
Print this Java Bean to @param out including an XML header.
|
void |
writeNode(Writer out) |
void |
writeNode(Writer out,
String nodeName,
String indent) |
void |
writeNode(Writer out,
String nodeName,
String namespace,
String indent,
Map namespaceMap)
It's not recommended to call this method directly.
|
protected void |
writeNodeAttributes(Writer out,
String nodeName,
String namespace,
String indent,
Map namespaceMap) |
protected void |
writeNodeChildren(Writer out,
String nodeName,
String namespace,
String indent,
Map namespaceMap) |
static void |
writeXML(Writer out,
char msg,
boolean attribute) |
static void |
writeXML(Writer out,
String msg)
Takes some text to be printed into an XML stream and escapes any
characters that might make it invalid XML (like '<').
|
static void |
writeXML(Writer out,
String msg,
boolean attribute) |
public static final String SCHEMA_TYPE_MAPPING
public BeanGraph()
public BeanGraph(BeanGraph source)
public BeanGraph(BeanGraph source, boolean justData)
justData - just copy the XML relevant datapublic void setSchemaTypeMapping(SchemaTypeMappingType[] value)
public void setSchemaTypeMapping(int index,
SchemaTypeMappingType value)
public SchemaTypeMappingType[] getSchemaTypeMapping()
public List fetchSchemaTypeMappingList()
public SchemaTypeMappingType getSchemaTypeMapping(int index)
public int sizeSchemaTypeMapping()
public int addSchemaTypeMapping(SchemaTypeMappingType value)
public int removeSchemaTypeMapping(SchemaTypeMappingType value)
public void _setSchemaLocation(String location)
public String _getSchemaLocation()
public SchemaTypeMappingType newSchemaTypeMappingType()
public SchemaTypeMappingType newSchemaTypeMappingType(SchemaTypeMappingType source, boolean justData)
public void write(File f) throws IOException
IOExceptionpublic void write(OutputStream out) throws IOException
IOExceptionpublic void write(OutputStream out, String encoding) throws IOException
IOExceptionpublic void write(Writer out, String encoding) throws IOException
encoding - is the encoding style that @param out was opened with.IOExceptionpublic void writeNode(Writer out) throws IOException
writeNode in interface CommonBeanIOExceptionpublic void writeNode(Writer out, String nodeName, String indent) throws IOException
writeNode in interface CommonBeanIOExceptionpublic void writeNode(Writer out, String nodeName, String namespace, String indent, Map namespaceMap) throws IOException
IOExceptionprotected void writeNodeAttributes(Writer out, String nodeName, String namespace, String indent, Map namespaceMap) throws IOException
IOExceptionprotected void writeNodeChildren(Writer out, String nodeName, String namespace, String indent, Map namespaceMap) throws IOException
IOExceptionpublic static BeanGraph read(File f) throws ParserConfigurationException, SAXException, IOException
public static BeanGraph read(InputStream in) throws ParserConfigurationException, SAXException, IOException
public static BeanGraph readNoEntityResolver(InputStream in) throws ParserConfigurationException, SAXException, IOException
public static BeanGraph read(InputSource in, boolean validate, EntityResolver er, ErrorHandler eh) throws ParserConfigurationException, SAXException, IOException
protected void readFromDocument(Document document)
public void readNode(Node node)
readNode in interface CommonBeanpublic void readNode(Node node, Map namespacePrefixes)
readNode in interface CommonBeanprotected void readNodeAttributes(Node node, Map namespacePrefixes, NamedNodeMap attrs)
protected boolean readNodeChild(Node childNode, String childNodeName, String childNodeValue, Map namespacePrefixes)
public static void writeXML(Writer out, String msg) throws IOException
IOExceptionpublic static void writeXML(Writer out, String msg, boolean attribute) throws IOException
IOExceptionpublic static void writeXML(Writer out, char msg, boolean attribute) throws IOException
IOExceptionpublic void validate()
throws BeanGraph.ValidateException
validate in interface CommonBeanBeanGraph.ValidateExceptionpublic void changePropertyByName(String name, Object value)
changePropertyByName in interface CommonBeanpublic Object fetchPropertyByName(String name)
fetchPropertyByName in interface CommonBeanpublic String nameSelf()
nameSelf in interface CommonBeanpublic String nameChild(Object childObj)
nameChild in interface CommonBeanpublic String nameChild(Object childObj, boolean returnConstName, boolean returnSchemaName)
nameChild in interface CommonBeanchildObj - The child object to search forreturnSchemaName - Whether or not the schema name should be returned or the property namepublic String nameChild(Object childObj, boolean returnConstName, boolean returnSchemaName, boolean returnXPathName)
nameChild in interface CommonBeanchildObj - The child object to search forreturnSchemaName - Whether or not the schema name should be returned or the property namepublic CommonBean[] childBeans(boolean recursive)
childBeans in interface CommonBeanpublic void childBeans(boolean recursive,
List beans)
childBeans in interface CommonBeanpublic boolean equals(Object o)
equals in interface CommonBeanequals in class Objectpublic boolean equals(BeanGraph inst)
public int hashCode()
hashCode in interface CommonBeanhashCode in class Objectpublic String toString()
toString in interface CommonBeantoString in class ObjectCopyright © 2017. All Rights Reserved.