public class FwkDOMHandler extends FwkDescription implements FwkDOMHandlerInterface
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected static java.util.HashMap |
cmdPropObjects |
static java.lang.String |
version |
author, buildnr, className, company, copyright, creationDate, dateFormatString, description, eMail, FWK_ICON, FWK_ICON_ARRAY, FWK_ICON_BG, FWK_ICON_BG_ARRAY, FWK_ICON_BG_LARGE, FWK_ICON_BG_LARGE_ARRAY, FWK_ICON_LARGE, FWK_ICON_LARGE_ARRAY, icon, ICON, iconCount, iconKey, internetAddress, name, titleName
AUTHOR, BUILDNR, COMPANY, COPYRIGHT, DATE_FORMAT, DEFAULT_ICON, DESCRIPTION, INTERNET, LARGE_ICON, LARGE_KEY_EXT, LARGE_OPAQUE_ICON, LARGE_OPAQUE_KEY_EXT, OPAQUE_ICON, OPAQUE_KEY_EXT, RCS_DATE_FORMAT, SUPPORT_EMAIL, TITLE_NAME
Constructor and Description |
---|
FwkDOMHandler()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
static org.w3c.dom.Element |
appendPropertyNode(org.w3c.dom.Node node,
java.lang.String name,
java.lang.String value)
Append a property node to the specified node.
|
static FwkArrayInterface |
getCommandProperties(java.lang.Class clazz)
Get an array containing the command properties.
|
java.lang.String |
getCompany()
Get the company that is responsable for that handler.
|
java.lang.String |
getVersion()
Return the version string of the FWK component.
|
static FwkDescriptionInterface |
readCommandsFromDOM(org.w3c.dom.Document doc,
org.w3c.dom.Element elem)
Reads a description object from DOM.
|
static FwkInstructionInterface |
readCommandsFromDOM(FwkInstructionInterface cmd,
org.w3c.dom.Document doc,
org.w3c.dom.Element elem)
Reads an instruction object from DOM.
|
java.lang.Object |
readConstructor(org.w3c.dom.Document document,
org.w3c.dom.Element node)
Read a construtor dom node.
|
static java.lang.Object |
readConstructor(java.lang.Object obj,
org.w3c.dom.Document document,
org.w3c.dom.Element node)
Read a construtor dom node.
|
void |
readFromDOM(org.w3c.dom.Document doc,
org.w3c.dom.Element element)
Read from DOM
|
static void |
readFromDOM(java.lang.Object obj,
org.w3c.dom.Document doc,
org.w3c.dom.Element element)
Read from DOM.
|
static java.lang.Object |
readFromXML(FwkControllerInterface controller,
java.io.InputStream is,
boolean validate)
Read a xml coming from an input stream.
|
static java.lang.Object |
readFromXML(FwkControllerInterface controller,
java.lang.String filename)
Read an xml file.
|
boolean |
readingDOM()
Get the DOM reading flag.
|
void |
readingDOM(boolean flag)
Set a flag that the object is currently reading the DOM.
|
static java.util.Map |
readMapFromDOM(org.w3c.dom.Document document,
org.w3c.dom.Element node)
This method reads a map from the given node.
|
static java.util.Map |
readMapFromDOM(java.util.Map map,
org.w3c.dom.Document document,
org.w3c.dom.Element node)
This method reads a map from the given node.
|
static void |
writeCommandsToDOM(FwkCommandInterface[] commands,
org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Element node,
FwkArrayInterface props)
Write an array containing commands to DOM.
|
org.w3c.dom.Element |
writeConstructor(org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Node node,
java.util.Map classProperties)
Write a construtor dom node.
|
static org.w3c.dom.Element |
writeConstructor(java.lang.Object object,
java.lang.String name,
boolean recursive,
org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Node node,
java.util.Map classProperties,
boolean withPropertyBus)
Write a construtor dom node.
|
static org.w3c.dom.Element |
writeDescriptionToDOM(FwkDescriptionInterface descriptor,
org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Node node)
Write a description to DOM.
|
static org.w3c.dom.Element |
writeFrameToDOM(FwkApplicationInterface application,
org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Element node)
Write the frame of the application to DOM.
|
static org.w3c.dom.Element |
writeMapToDOM(java.util.Map map,
org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Element node,
java.util.Map classProperties)
This method writes a map of the given object to DOM.
|
static org.w3c.dom.Element |
writePanelToDOM(FwkPanelInterface panel,
org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Element node)
Write a panel to DOM.
|
static void |
writePropertiesToDOM(java.lang.Object object,
org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Element node,
java.util.Map classProperties)
This method writes the properties of the given object to DOM.
|
org.w3c.dom.Element |
writeToDOM(org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Node node,
java.util.Map classProperties)
Write the container as child to the given DOM node.
|
static boolean |
writeToXML(FwkDescriptionInterface descriptor,
java.lang.String filename,
boolean validate)
Writes a descriptor to a XML file.
|
static boolean |
writeToXML(FwkDOMHandlerInterface handler,
java.lang.String filename,
java.lang.Class[] interpreters,
boolean validate)
Writes a dom handler to an XML file.
|
static boolean |
writeToXML(FwkDOMHandlerInterface handler,
java.lang.String filename,
java.lang.Class interpreter,
boolean validate)
Writes a DOM handler to a XML file.
|
static boolean |
writeToXML(FwkDOMHandlerInterface handler,
java.io.Writer writer,
java.lang.Class[] interpreters,
boolean validate)
Writes a dom handler to a writer.
|
boolean |
writeToXML(java.lang.String filename,
boolean validate)
Write the handle to the given xml file.
|
getAuthor, getBuild, getClassName, getCompanyInternetAddress, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getIcon, getIcon, getIconKey, getIconKey, getName, getPresentationString, getPresentationString, getSupportEMail, getTitle, getTitleName, getTransferData, getTransferDataFlavors, isDataFlavorSupported, lostOwnership, setAuthor, setBuild, setClassName, setCompany, setCompanyInternetAddress, setCopyright, setCreationDate, setCreationDate, setDateFormatString, setDescription, setDescriptor, setIcon, setIcon, setIconKey, setIconKey, setName, setSupportEMail, setTitleName, toString
getNiceVersion, release
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAuthor, getBuild, getClassName, getCompanyInternetAddress, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getIcon, getIcon, getIconKey, getIconKey, getName, getPresentationString, getPresentationString, getSupportEMail, getTitle, getTitleName, setAuthor, setBuild, setClassName, setCompany, setCompanyInternetAddress, setCopyright, setCreationDate, setCreationDate, setDateFormatString, setDescription, setDescriptor, setIcon, setIcon, setIconKey, setIconKey, setName, setSupportEMail, setTitleName
release
public static final java.lang.String version
protected static java.util.HashMap cmdPropObjects
public java.lang.String getVersion()
FwkInterface
getVersion
in interface FwkInterface
getVersion
in class FwkDescription
public void readingDOM(boolean flag)
readingDOM
in interface FwkDOMHandlerInterface
flag
- true if the object reads currently fom DOM.public boolean readingDOM()
readingDOM
in interface FwkDOMHandlerInterface
public java.lang.Object readConstructor(org.w3c.dom.Document document, org.w3c.dom.Element node)
readConstructor
in interface FwkDOMHandlerInterface
document
- The documnent Object Model.node
- The node.public static java.lang.Object readConstructor(java.lang.Object obj, org.w3c.dom.Document document, org.w3c.dom.Element node)
obj
- The parent object.document
- The documnent Object Model.node
- The node.public void readFromDOM(org.w3c.dom.Document doc, org.w3c.dom.Element element)
readFromDOM
in interface FwkDOMHandlerInterface
document
- The documnent Object Model.node
- The node.public static void readFromDOM(java.lang.Object obj, org.w3c.dom.Document doc, org.w3c.dom.Element element)
object
- The object that should be configurate.document
- The documnent Object Model.node
- The node.public org.w3c.dom.Element writeConstructor(org.w3c.dom.Document document, FwkXmlDtdInterface dtd, org.w3c.dom.Node node, java.util.Map classProperties)
writeConstructor
in interface FwkDOMHandlerInterface
document
- The documnent Object Model.dtd
- The dtd descriptor.node
- The node.classProperties
- Map the contains the writable object properties.
May be null.public static org.w3c.dom.Element writeConstructor(java.lang.Object object, java.lang.String name, boolean recursive, org.w3c.dom.Document document, FwkXmlDtdInterface dtd, org.w3c.dom.Node node, java.util.Map classProperties, boolean withPropertyBus)
object
- The object to be written.name
- The name of the new node.recursive
- If true the element will be defined as recursive element.document
- The documnent Object Model.dtd
- The dtd descriptor.node
- The node.classProperties
- Map the contains the writable object properties.
May be null.withPropertyBus
- If the node is the root node and this value is
true then the properties from PropertyBus
will be written first.public org.w3c.dom.Element writeToDOM(org.w3c.dom.Document document, FwkXmlDtdInterface dtd, org.w3c.dom.Node node, java.util.Map classProperties)
writeToDOM
in interface FwkDOMHandlerInterface
document
- The documnent Object Model.dtd
- The dtd descriptor.node
- The parent node.classProperties
- Map the contains the writable properties.
May be null.public static FwkArrayInterface getCommandProperties(java.lang.Class clazz)
public static FwkInstructionInterface readCommandsFromDOM(FwkInstructionInterface cmd, org.w3c.dom.Document doc, org.w3c.dom.Element elem)
cmd
- The command.doc
- The document object model.elem
- The node from that the command should read.public static org.w3c.dom.Element writeFrameToDOM(FwkApplicationInterface application, org.w3c.dom.Document document, FwkXmlDtdInterface dtd, org.w3c.dom.Element node)
application
- The application.document
- The document object model.dtd
- The dtd descriptor.node
- The parent node.public static org.w3c.dom.Element writePanelToDOM(FwkPanelInterface panel, org.w3c.dom.Document document, FwkXmlDtdInterface dtd, org.w3c.dom.Element node)
panel
- The panel.document
- The document object model.dtd
- The dtd descriptor.node
- The parent node.public static org.w3c.dom.Element writeDescriptionToDOM(FwkDescriptionInterface descriptor, org.w3c.dom.Document document, FwkXmlDtdInterface dtd, org.w3c.dom.Node node)
description
- A description.document
- The document object model.dtd
- The dtd descriptor.node
- The parent node.public static FwkDescriptionInterface readCommandsFromDOM(org.w3c.dom.Document doc, org.w3c.dom.Element elem)
doc
- The document object model.elem
- The node from that the command should read.public static void writeCommandsToDOM(FwkCommandInterface[] commands, org.w3c.dom.Document document, FwkXmlDtdInterface dtd, org.w3c.dom.Element node, FwkArrayInterface props)
commands
- The array containing the commands to be written.document
- The document object model.dtd
- The dtd descriptor.node
- The parent node.classProperties
- Map the contains the writable properties.
May be null.public static org.w3c.dom.Element appendPropertyNode(org.w3c.dom.Node node, java.lang.String name, java.lang.String value)
node
- The node to that the property node should be appended.
It must be part of a document.name
- The name of the property node.value
- The value of the property node.public static void writePropertiesToDOM(java.lang.Object object, org.w3c.dom.Document document, FwkXmlDtdInterface dtd, org.w3c.dom.Element node, java.util.Map classProperties)
object
- The object that should be dumped to DOM.document
- The document object model.dtd
- The dtd descriptor.node
- The node of the object.classProperties
- Map the contains the writable properties.
May be null.public static java.util.Map readMapFromDOM(java.util.Map map, org.w3c.dom.Document document, org.w3c.dom.Element node)
map
- The map to be read.document
- The document object model.node
- The node of the object.classProperties
- Map the contains the writable properties.
May be null.public static java.util.Map readMapFromDOM(org.w3c.dom.Document document, org.w3c.dom.Element node)
document
- The document object model.node
- The node of the object.classProperties
- Map the contains the writable properties.
May be null.public static org.w3c.dom.Element writeMapToDOM(java.util.Map map, org.w3c.dom.Document document, FwkXmlDtdInterface dtd, org.w3c.dom.Element node, java.util.Map classProperties)
map
- The map that should be dumped to DOM.document
- The document object model.dtd
- The dtd descriptor.node
- The node of the object.classProperties
- Map the contains the writable properties.
May be null.public java.lang.String getCompany()
getCompany
in interface FwkDescriptionInterface
getCompany
in interface FwkDOMHandlerInterface
getCompany
in class FwkDescription
FwkDescription.setCompany(String)
public boolean writeToXML(java.lang.String filename, boolean validate)
writeToXML
in interface FwkDOMHandlerInterface
filename
- The name of the xml file.validate
- Write a validated cml file.public static boolean writeToXML(FwkDescriptionInterface descriptor, java.lang.String filename, boolean validate)
descriptor
- The descriptor to be written.filename
- The name of the file to be written.validate
- Write a validate XML file.public static boolean writeToXML(FwkDOMHandlerInterface handler, java.lang.String filename, java.lang.Class interpreter, boolean validate)
handler
- The object to be written.filename
- The name of the file to be written.interpreters
- The interpreter class.validate
- If true the DTD will be written.public static boolean writeToXML(FwkDOMHandlerInterface handler, java.lang.String filename, java.lang.Class[] interpreters, boolean validate)
handler
- The object to be written.filename
- The name of the file to be written.interpreters
- An Array containing the interpreters.validate
- If true the DTD will be written.public static boolean writeToXML(FwkDOMHandlerInterface handler, java.io.Writer writer, java.lang.Class[] interpreters, boolean validate)
handler
- The object to be written.writer
- The writer.interpreters
- An Array containing the interpreters.validate
- If true the DTD will be written.public static java.lang.Object readFromXML(FwkControllerInterface controller, java.lang.String filename) throws FwkException
filename
- The name of the file to be read.FwkException
public static java.lang.Object readFromXML(FwkControllerInterface controller, java.io.InputStream is, boolean validate) throws java.lang.Exception
controller
- the controller the read object.is
- The input stream.validate
- If true the parser will validate the stream.java.lang.Exception