com.pmease.quickbuild.migration
Class VersionedDocument
java.lang.Object
com.pmease.quickbuild.migration.VersionedDocument
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, org.dom4j.Branch, org.dom4j.Document, org.dom4j.Node
public final class VersionedDocument
- extends java.lang.Object
- implements org.dom4j.Document, java.io.Externalizable
- See Also:
- Serialized Form
|
Field Summary |
static com.thoughtworks.xstream.XStream |
xstream
|
| Fields inherited from interface org.dom4j.Node |
ANY_NODE, ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, MAX_NODE_TYPE, NAMESPACE_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, UNKNOWN_NODE |
|
Method Summary |
void |
accept(org.dom4j.Visitor visitor)
|
void |
add(org.dom4j.Comment comment)
|
void |
add(org.dom4j.Element element)
|
void |
add(org.dom4j.Node node)
|
void |
add(org.dom4j.ProcessingInstruction pi)
|
org.dom4j.Document |
addComment(java.lang.String comment)
|
org.dom4j.Document |
addDocType(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
|
org.dom4j.Element |
addElement(org.dom4j.QName qname)
|
org.dom4j.Element |
addElement(java.lang.String name)
|
org.dom4j.Element |
addElement(java.lang.String qualifiedName,
java.lang.String namespaceURI)
|
org.dom4j.Document |
addProcessingInstruction(java.lang.String target,
java.util.Map data)
|
org.dom4j.Document |
addProcessingInstruction(java.lang.String target,
java.lang.String text)
|
void |
appendContent(org.dom4j.Branch branch)
|
java.lang.String |
asXML()
|
org.dom4j.Node |
asXPathResult(org.dom4j.Element parent)
|
void |
clearContent()
|
java.lang.Object |
clone()
|
java.util.List |
content()
|
org.dom4j.XPath |
createXPath(java.lang.String xpathExpression)
|
org.dom4j.Node |
detach()
|
org.dom4j.Element |
elementByID(java.lang.String elementID)
|
static VersionedDocument |
fromBean(java.lang.Object bean)
|
static VersionedDocument |
fromXML(java.lang.String xml)
|
org.dom4j.DocumentType |
getDocType()
|
org.dom4j.Document |
getDocument()
|
org.xml.sax.EntityResolver |
getEntityResolver()
|
java.lang.String |
getName()
|
short |
getNodeType()
|
java.lang.String |
getNodeTypeName()
|
org.dom4j.Element |
getParent()
|
java.lang.String |
getPath()
|
java.lang.String |
getPath(org.dom4j.Element context)
|
org.dom4j.Element |
getRootElement()
|
java.lang.String |
getStringValue()
|
java.lang.String |
getText()
|
java.lang.String |
getUniquePath()
|
java.lang.String |
getUniquePath(org.dom4j.Element context)
|
java.lang.String |
getValue(java.lang.String name)
|
java.lang.String |
getVersion()
|
org.dom4j.Document |
getWrapped()
|
java.lang.String |
getXMLEncoding()
|
boolean |
hasContent()
|
int |
indexOf(org.dom4j.Node node)
|
boolean |
isReadOnly()
|
boolean |
matches(java.lang.String xpathExpression)
|
org.dom4j.Node |
node(int index)
|
int |
nodeCount()
|
java.util.Iterator |
nodeIterator()
|
void |
normalize()
|
java.lang.Number |
numberValueOf(java.lang.String xpathExpression)
|
org.dom4j.ProcessingInstruction |
processingInstruction(java.lang.String target)
|
java.util.List |
processingInstructions()
|
java.util.List |
processingInstructions(java.lang.String target)
|
void |
readExternal(java.io.ObjectInput in)
|
boolean |
remove(org.dom4j.Comment comment)
|
boolean |
remove(org.dom4j.Element element)
|
boolean |
remove(org.dom4j.Node node)
|
boolean |
remove(org.dom4j.ProcessingInstruction pi)
|
boolean |
removeProcessingInstruction(java.lang.String target)
|
java.util.List |
selectNodes(java.lang.String xpathExpression)
|
java.util.List |
selectNodes(java.lang.String xpathExpression,
java.lang.String comparisonXPathExpression)
|
java.util.List |
selectNodes(java.lang.String xpathExpression,
java.lang.String comparisonXPathExpression,
boolean removeDuplicates)
|
java.lang.Object |
selectObject(java.lang.String xpathExpression)
|
org.dom4j.Node |
selectSingleNode(java.lang.String xpathExpression)
|
void |
setContent(java.util.List content)
|
void |
setDocType(org.dom4j.DocumentType docType)
|
void |
setDocument(org.dom4j.Document document)
|
void |
setEntityResolver(org.xml.sax.EntityResolver entityResolver)
|
void |
setName(java.lang.String name)
|
void |
setParent(org.dom4j.Element parent)
|
void |
setProcessingInstructions(java.util.List listOfPIs)
|
void |
setRootElement(org.dom4j.Element rootElement)
|
void |
setText(java.lang.String text)
|
void |
setValue(java.lang.String name,
java.lang.String value)
|
void |
setVersion(java.lang.String version)
|
void |
setWrapped(org.dom4j.Document wrapped)
|
void |
setWrapped(org.dom4j.Element wrapped)
|
void |
setXMLEncoding(java.lang.String encoding)
|
boolean |
supportsParent()
|
java.lang.Object |
toBean()
Convert this document to bean. |
java.lang.Object |
toBean(MigrationListener listener)
Convert this document to bean. |
java.lang.Object |
toBean(MigrationListener listener,
java.lang.Class<?> beanClass)
Convert this document to bean. |
java.lang.String |
toXML()
|
java.lang.String |
toXML(boolean pretty)
|
void |
validate()
|
java.lang.String |
valueOf(java.lang.String xpathExpression)
|
void |
write(java.io.Writer writer)
|
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xstream
public static com.thoughtworks.xstream.XStream xstream
VersionedDocument
public VersionedDocument()
VersionedDocument
public VersionedDocument(org.dom4j.Document wrapped)
VersionedDocument
public VersionedDocument(org.dom4j.Element wrapped)
setWrapped
public void setWrapped(org.dom4j.Document wrapped)
setWrapped
public void setWrapped(org.dom4j.Element wrapped)
addComment
public org.dom4j.Document addComment(java.lang.String comment)
- Specified by:
addComment in interface org.dom4j.Document
addDocType
public org.dom4j.Document addDocType(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
- Specified by:
addDocType in interface org.dom4j.Document
addProcessingInstruction
public org.dom4j.Document addProcessingInstruction(java.lang.String target,
java.lang.String text)
- Specified by:
addProcessingInstruction in interface org.dom4j.Document
addProcessingInstruction
public org.dom4j.Document addProcessingInstruction(java.lang.String target,
java.util.Map data)
- Specified by:
addProcessingInstruction in interface org.dom4j.Document
getDocType
public org.dom4j.DocumentType getDocType()
- Specified by:
getDocType in interface org.dom4j.Document
getEntityResolver
public org.xml.sax.EntityResolver getEntityResolver()
- Specified by:
getEntityResolver in interface org.dom4j.Document
getRootElement
public org.dom4j.Element getRootElement()
- Specified by:
getRootElement in interface org.dom4j.Document
getXMLEncoding
public java.lang.String getXMLEncoding()
- Specified by:
getXMLEncoding in interface org.dom4j.Document
setDocType
public void setDocType(org.dom4j.DocumentType docType)
- Specified by:
setDocType in interface org.dom4j.Document
setEntityResolver
public void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
- Specified by:
setEntityResolver in interface org.dom4j.Document
setRootElement
public void setRootElement(org.dom4j.Element rootElement)
- Specified by:
setRootElement in interface org.dom4j.Document
setXMLEncoding
public void setXMLEncoding(java.lang.String encoding)
- Specified by:
setXMLEncoding in interface org.dom4j.Document
add
public void add(org.dom4j.Node node)
- Specified by:
add in interface org.dom4j.Branch
add
public void add(org.dom4j.Comment comment)
- Specified by:
add in interface org.dom4j.Branch
add
public void add(org.dom4j.Element element)
- Specified by:
add in interface org.dom4j.Branch
add
public void add(org.dom4j.ProcessingInstruction pi)
- Specified by:
add in interface org.dom4j.Branch
addElement
public org.dom4j.Element addElement(java.lang.String name)
- Specified by:
addElement in interface org.dom4j.Branch
addElement
public org.dom4j.Element addElement(org.dom4j.QName qname)
- Specified by:
addElement in interface org.dom4j.Branch
addElement
public org.dom4j.Element addElement(java.lang.String qualifiedName,
java.lang.String namespaceURI)
- Specified by:
addElement in interface org.dom4j.Branch
appendContent
public void appendContent(org.dom4j.Branch branch)
- Specified by:
appendContent in interface org.dom4j.Branch
clearContent
public void clearContent()
- Specified by:
clearContent in interface org.dom4j.Branch
content
public java.util.List content()
- Specified by:
content in interface org.dom4j.Branch
elementByID
public org.dom4j.Element elementByID(java.lang.String elementID)
- Specified by:
elementByID in interface org.dom4j.Branch
indexOf
public int indexOf(org.dom4j.Node node)
- Specified by:
indexOf in interface org.dom4j.Branch
node
public org.dom4j.Node node(int index)
throws java.lang.IndexOutOfBoundsException
- Specified by:
node in interface org.dom4j.Branch
- Throws:
java.lang.IndexOutOfBoundsException
nodeCount
public int nodeCount()
- Specified by:
nodeCount in interface org.dom4j.Branch
nodeIterator
public java.util.Iterator nodeIterator()
- Specified by:
nodeIterator in interface org.dom4j.Branch
normalize
public void normalize()
- Specified by:
normalize in interface org.dom4j.Branch
processingInstruction
public org.dom4j.ProcessingInstruction processingInstruction(java.lang.String target)
- Specified by:
processingInstruction in interface org.dom4j.Branch
processingInstructions
public java.util.List processingInstructions()
- Specified by:
processingInstructions in interface org.dom4j.Branch
processingInstructions
public java.util.List processingInstructions(java.lang.String target)
- Specified by:
processingInstructions in interface org.dom4j.Branch
remove
public boolean remove(org.dom4j.Node node)
- Specified by:
remove in interface org.dom4j.Branch
remove
public boolean remove(org.dom4j.Comment comment)
- Specified by:
remove in interface org.dom4j.Branch
remove
public boolean remove(org.dom4j.Element element)
- Specified by:
remove in interface org.dom4j.Branch
remove
public boolean remove(org.dom4j.ProcessingInstruction pi)
- Specified by:
remove in interface org.dom4j.Branch
removeProcessingInstruction
public boolean removeProcessingInstruction(java.lang.String target)
- Specified by:
removeProcessingInstruction in interface org.dom4j.Branch
setContent
public void setContent(java.util.List content)
- Specified by:
setContent in interface org.dom4j.Branch
setProcessingInstructions
public void setProcessingInstructions(java.util.List listOfPIs)
- Specified by:
setProcessingInstructions in interface org.dom4j.Branch
accept
public void accept(org.dom4j.Visitor visitor)
- Specified by:
accept in interface org.dom4j.Node
asXML
public java.lang.String asXML()
- Specified by:
asXML in interface org.dom4j.Node
asXPathResult
public org.dom4j.Node asXPathResult(org.dom4j.Element parent)
- Specified by:
asXPathResult in interface org.dom4j.Node
createXPath
public org.dom4j.XPath createXPath(java.lang.String xpathExpression)
throws org.dom4j.InvalidXPathException
- Specified by:
createXPath in interface org.dom4j.Node
- Throws:
org.dom4j.InvalidXPathException
detach
public org.dom4j.Node detach()
- Specified by:
detach in interface org.dom4j.Node
getDocument
public org.dom4j.Document getDocument()
- Specified by:
getDocument in interface org.dom4j.Node
getName
public java.lang.String getName()
- Specified by:
getName in interface org.dom4j.Node
getNodeType
public short getNodeType()
- Specified by:
getNodeType in interface org.dom4j.Node
getNodeTypeName
public java.lang.String getNodeTypeName()
- Specified by:
getNodeTypeName in interface org.dom4j.Node
getParent
public org.dom4j.Element getParent()
- Specified by:
getParent in interface org.dom4j.Node
getPath
public java.lang.String getPath()
- Specified by:
getPath in interface org.dom4j.Node
getPath
public java.lang.String getPath(org.dom4j.Element context)
- Specified by:
getPath in interface org.dom4j.Node
getStringValue
public java.lang.String getStringValue()
- Specified by:
getStringValue in interface org.dom4j.Node
getText
public java.lang.String getText()
- Specified by:
getText in interface org.dom4j.Node
getUniquePath
public java.lang.String getUniquePath()
- Specified by:
getUniquePath in interface org.dom4j.Node
getUniquePath
public java.lang.String getUniquePath(org.dom4j.Element context)
- Specified by:
getUniquePath in interface org.dom4j.Node
hasContent
public boolean hasContent()
- Specified by:
hasContent in interface org.dom4j.Node
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly in interface org.dom4j.Node
matches
public boolean matches(java.lang.String xpathExpression)
- Specified by:
matches in interface org.dom4j.Node
numberValueOf
public java.lang.Number numberValueOf(java.lang.String xpathExpression)
- Specified by:
numberValueOf in interface org.dom4j.Node
selectNodes
public java.util.List selectNodes(java.lang.String xpathExpression)
- Specified by:
selectNodes in interface org.dom4j.Node
selectNodes
public java.util.List selectNodes(java.lang.String xpathExpression,
java.lang.String comparisonXPathExpression)
- Specified by:
selectNodes in interface org.dom4j.Node
selectNodes
public java.util.List selectNodes(java.lang.String xpathExpression,
java.lang.String comparisonXPathExpression,
boolean removeDuplicates)
- Specified by:
selectNodes in interface org.dom4j.Node
selectObject
public java.lang.Object selectObject(java.lang.String xpathExpression)
- Specified by:
selectObject in interface org.dom4j.Node
selectSingleNode
public org.dom4j.Node selectSingleNode(java.lang.String xpathExpression)
- Specified by:
selectSingleNode in interface org.dom4j.Node
setDocument
public void setDocument(org.dom4j.Document document)
- Specified by:
setDocument in interface org.dom4j.Node
setName
public void setName(java.lang.String name)
- Specified by:
setName in interface org.dom4j.Node
setParent
public void setParent(org.dom4j.Element parent)
- Specified by:
setParent in interface org.dom4j.Node
setText
public void setText(java.lang.String text)
- Specified by:
setText in interface org.dom4j.Node
supportsParent
public boolean supportsParent()
- Specified by:
supportsParent in interface org.dom4j.Node
valueOf
public java.lang.String valueOf(java.lang.String xpathExpression)
- Specified by:
valueOf in interface org.dom4j.Node
write
public void write(java.io.Writer writer)
throws java.io.IOException
- Specified by:
write in interface org.dom4j.Node
- Throws:
java.io.IOException
clone
public java.lang.Object clone()
- Specified by:
clone in interface org.dom4j.Node- Overrides:
clone in class java.lang.Object
toXML
public java.lang.String toXML()
toXML
public java.lang.String toXML(boolean pretty)
fromXML
public static VersionedDocument fromXML(java.lang.String xml)
getWrapped
public org.dom4j.Document getWrapped()
fromBean
public static VersionedDocument fromBean(java.lang.Object bean)
toBean
public java.lang.Object toBean()
- Convert this document to bean. Migration will performed if necessary.
During the migration, content of the document will also get updated
to reflect current migration result.
- Returns:
toBean
public java.lang.Object toBean(MigrationListener listener)
- Convert this document to bean. Migration will performed if necessary.
During the migration, content of the document will also get updated
to reflect current migration result.
- Returns:
toBean
public java.lang.Object toBean(MigrationListener listener,
java.lang.Class<?> beanClass)
- Convert this document to bean. Migration will performed if necessary.
During the migration, content of the document will also get updated
to reflect current migration result.
- Returns:
getVersion
public java.lang.String getVersion()
setVersion
public void setVersion(java.lang.String version)
getValue
public java.lang.String getValue(java.lang.String name)
setValue
public void setValue(java.lang.String name,
java.lang.String value)
validate
public void validate()
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal in interface java.io.Externalizable
- Throws:
java.io.IOException
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal in interface java.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
Copyright © 2005-2010 PMEase Inc. All Rights Reserved.