com.dynamide.util
Class XDB

java.lang.Object
  extended by com.dynamide.DynamideObject
      extended by com.dynamide.util.XDB
All Implemented Interfaces:
IGet

public class XDB
extends DynamideObject


Field Summary
 
Fields inherited from class com.dynamide.DynamideObject
m_id
 
Constructor Summary
XDB()
           
XDB(java.lang.String saxDriverClassname)
           
 
Method Summary
protected  void addError(java.lang.String error)
           
 void clearErrors()
           
 boolean cloneXML(java.lang.String xmlRepositoryName, java.lang.String clonedRepositoryName)
           
 void closeXML(java.lang.String xmlRepositoryName)
          Removes the named xmlRepository from the store.
 org.jdom.Document createDocument(java.lang.String rootName)
           
 org.jdom.Element createElement(java.lang.String name)
           
 org.jdom.Element createXML(java.lang.String xmlRepositoryName, java.lang.String rootName)
           
static java.lang.String dm_nbsp(java.lang.String source)
           
 java.lang.String dumpPointerList()
           
 XDBElement first(org.jdom.Element el)
           
 XDBElement first(java.lang.String xpath)
           
 java.lang.Object get(java.lang.String xpathExpression)
          Subclasses can override this.
static java.lang.String getChildText(org.jdom.Element el, java.lang.String childName)
           
 java.lang.String getDefaultStoreName()
          Methods that require an xmlRepositoryName have overloads that don't, if the DefaultStoreName is set.
 java.lang.String getErrors()
           
 java.util.Set getStoreNames()
           
 org.jdom.Element getXML(java.lang.String xmlRepositoryName)
           
 java.lang.String getXMLString(java.lang.String xmlRepositoryName)
           
 java.lang.String getXMLStringAsHTML(java.lang.String xmlRepositoryName)
           
static void main(java.lang.String[] args)
           
 org.jdom.Element openXML(java.lang.String xmlFilename)
          Merge all child elements from source into target.
 org.jdom.Element openXML(java.lang.String xmlRepositoryName, java.lang.String xmlFilename)
          TODO: write a public void invalidate xmlRepository method to remove names from the store.
static java.lang.String outputElement_INNER(org.jdom.Element el, boolean contentOnly)
           
static java.lang.String outputElement(org.jdom.Element el)
           
static java.lang.String outputElementAsHTML(org.jdom.Element el)
           
static java.lang.String outputElementContent(org.jdom.Element el)
           
static java.lang.String outputNode(org.dom4j.Node node)
          This is a dom4j convenience method, which knows about XHTML.
 org.jaxen.XPath prepare(java.lang.String xpathExpression)
           
 java.lang.String printStoreNames()
           
 org.jdom.Document read(java.lang.String filename)
           
 org.jdom.Document readFromString(java.lang.String source)
           
 org.jdom.Document readFromString(java.lang.String source, java.lang.String xmlRepositoryName)
           
 void removeXML(java.lang.String xmlRepositoryName)
          clear the repository name from the space
 java.lang.Object retrievePointer(java.lang.String name)
           
 boolean saveXML(java.lang.String filename)
           
 boolean saveXML(java.lang.String xmlRepositoryName, java.lang.String filename)
           
 boolean saveXML(java.lang.String xmlRepositoryName, java.lang.String directory, java.lang.String filename)
           
 java.util.List select(org.jdom.Element element, java.lang.String xpathExpression)
           
 java.util.List select(org.jdom.Element element, org.jaxen.XPath xpath)
           
 java.util.List select(java.lang.String xpathExpression)
          Select from the DefaultStoreName, if set.
 java.util.List select(java.lang.String storeName, java.lang.String xpathExpression)
           
 org.jdom.Element selectFirst(org.jdom.Element element, java.lang.String xpathExpression)
           
 org.jdom.Element selectFirst(org.jdom.Element element, org.jaxen.XPath xpath)
           
 org.jdom.Element selectFirst(java.lang.String xpathExpression)
          Select from the DefaultStoreName, if set.
 org.jdom.Element selectFirst(java.lang.String storeName, java.lang.String xpathExpression)
           
 void setDefaultStoreName(java.lang.String new_value)
          Methods that require an xmlRepositoryName have overloads that don't, if the DefaultStoreName is set by this setter; Calling openXML when DefaultStoreName is not set initializes DefaultStoreName.
 void setQuickElement(org.jdom.Element element)
           
 void storePointer(java.lang.String name, java.lang.Object pointer)
           
static java.lang.String unescape(java.lang.String source)
           
 java.lang.String v(java.lang.String xpathExpression)
           
 java.lang.String valueOf(org.jdom.Element element, java.lang.String xpathExpression)
           
 java.lang.String valueOf(java.lang.String xpathExpression)
          Uses the DefaultStoreName, if set.
 java.lang.String valueOf(java.lang.String storeName, java.lang.String xpathExpression)
           
 java.lang.String valueOfAll(org.jdom.Element element, java.lang.String xpathExpression)
           
 java.lang.String valueOfAll(java.lang.String xpathExpression)
          Uses the DefaultStoreName, if set.
 java.lang.String valueOfAll(java.lang.String storeName, java.lang.String xpathExpression)
           
 XDBElement xdbElement(org.jdom.Element el)
           
 
Methods inherited from class com.dynamide.DynamideObject
clearProfiler, dump, dump, dumpHTML, expand, finalize, findParentExpander, findParentPage, findParentSession, findTopParentPage, getCategoryID, getDotName, getID, getNextGetter, getObjectID, getOwner, getProfiler, isDebugEnabled, isInfoEnabled, logDebug, logDebug, logDebug, logDebug, logError, logError, logError, logError, logInfo, logInfo, logInfo, logInfo, logWarn, logWarn, logWarn, logWarn, popLogContext, printf, printProfiler, profileEnter, profileLeave, pushLogContext, setDotName, setID, setNextGetter, setObjectID, setOwner, sprintf, useProfiler, walkParents
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XDB

public XDB()

XDB

public XDB(java.lang.String saxDriverClassname)
Method Detail

addError

protected void addError(java.lang.String error)

clearErrors

public void clearErrors()

getErrors

public java.lang.String getErrors()

printStoreNames

public java.lang.String printStoreNames()

getStoreNames

public java.util.Set getStoreNames()

getDefaultStoreName

public java.lang.String getDefaultStoreName()
Methods that require an xmlRepositoryName have overloads that don't, if the DefaultStoreName is set.


setDefaultStoreName

public void setDefaultStoreName(java.lang.String new_value)
Methods that require an xmlRepositoryName have overloads that don't, if the DefaultStoreName is set by this setter; Calling openXML when DefaultStoreName is not set initializes DefaultStoreName.


cloneXML

public boolean cloneXML(java.lang.String xmlRepositoryName,
                        java.lang.String clonedRepositoryName)

createDocument

public org.jdom.Document createDocument(java.lang.String rootName)

createElement

public org.jdom.Element createElement(java.lang.String name)

createXML

public org.jdom.Element createXML(java.lang.String xmlRepositoryName,
                                  java.lang.String rootName)

dm_nbsp

public static java.lang.String dm_nbsp(java.lang.String source)

dumpPointerList

public java.lang.String dumpPointerList()

getChildText

public static java.lang.String getChildText(org.jdom.Element el,
                                            java.lang.String childName)

getXML

public org.jdom.Element getXML(java.lang.String xmlRepositoryName)

getXMLString

public java.lang.String getXMLString(java.lang.String xmlRepositoryName)

getXMLStringAsHTML

public java.lang.String getXMLStringAsHTML(java.lang.String xmlRepositoryName)

outputElement

public static java.lang.String outputElement(org.jdom.Element el)

outputElementContent

public static java.lang.String outputElementContent(org.jdom.Element el)

outputElement_INNER

public static java.lang.String outputElement_INNER(org.jdom.Element el,
                                                   boolean contentOnly)

outputElementAsHTML

public static java.lang.String outputElementAsHTML(org.jdom.Element el)

openXML

public org.jdom.Element openXML(java.lang.String xmlFilename)
Merge all child elements from source into target.


openXML

public org.jdom.Element openXML(java.lang.String xmlRepositoryName,
                                java.lang.String xmlFilename)
TODO: write a public void invalidate xmlRepository method to remove names from the store. If the DefaultStoreName is not set, this method will set it as a side-effect.


closeXML

public void closeXML(java.lang.String xmlRepositoryName)
Removes the named xmlRepository from the store. Also resets the DefaultStoreName to "" if it was the current default.


outputNode

public static java.lang.String outputNode(org.dom4j.Node node)
This is a dom4j convenience method, which knows about XHTML. If you just want pretty printed xml from your jdom tree, use this class' getXMLString, which doesn't respect the rules of XHTML, such as PRE sections.


prepare

public org.jaxen.XPath prepare(java.lang.String xpathExpression)
                        throws org.jaxen.JaxenException
Throws:
org.jaxen.JaxenException

read

public org.jdom.Document read(java.lang.String filename)
                       throws org.jdom.JDOMException,
                              java.io.IOException
Throws:
org.jdom.JDOMException
java.io.IOException

readFromString

public org.jdom.Document readFromString(java.lang.String source)
                                 throws java.io.IOException,
                                        org.jdom.JDOMException
Throws:
java.io.IOException
org.jdom.JDOMException

readFromString

public org.jdom.Document readFromString(java.lang.String source,
                                        java.lang.String xmlRepositoryName)
                                 throws java.io.IOException,
                                        org.jdom.JDOMException
Throws:
java.io.IOException
org.jdom.JDOMException

removeXML

public void removeXML(java.lang.String xmlRepositoryName)
clear the repository name from the space


retrievePointer

public java.lang.Object retrievePointer(java.lang.String name)
See Also:
storePointer(java.lang.String, java.lang.Object)

saveXML

public boolean saveXML(java.lang.String filename)

saveXML

public boolean saveXML(java.lang.String xmlRepositoryName,
                       java.lang.String filename)

saveXML

public boolean saveXML(java.lang.String xmlRepositoryName,
                       java.lang.String directory,
                       java.lang.String filename)

select

public java.util.List select(java.lang.String xpathExpression)
Select from the DefaultStoreName, if set.


select

public java.util.List select(java.lang.String storeName,
                             java.lang.String xpathExpression)

select

public java.util.List select(org.jdom.Element element,
                             java.lang.String xpathExpression)

select

public java.util.List select(org.jdom.Element element,
                             org.jaxen.XPath xpath)
See Also:
prepare(java.lang.String)

selectFirst

public org.jdom.Element selectFirst(java.lang.String xpathExpression)
Select from the DefaultStoreName, if set.


selectFirst

public org.jdom.Element selectFirst(java.lang.String storeName,
                                    java.lang.String xpathExpression)

selectFirst

public org.jdom.Element selectFirst(org.jdom.Element element,
                                    java.lang.String xpathExpression)

selectFirst

public org.jdom.Element selectFirst(org.jdom.Element element,
                                    org.jaxen.XPath xpath)
See Also:
prepare(java.lang.String)

storePointer

public void storePointer(java.lang.String name,
                         java.lang.Object pointer)
See Also:
retrievePointer(java.lang.String)

unescape

public static java.lang.String unescape(java.lang.String source)

valueOf

public java.lang.String valueOf(java.lang.String xpathExpression)
Uses the DefaultStoreName, if set.


valueOf

public java.lang.String valueOf(java.lang.String storeName,
                                java.lang.String xpathExpression)

valueOf

public java.lang.String valueOf(org.jdom.Element element,
                                java.lang.String xpathExpression)

setQuickElement

public void setQuickElement(org.jdom.Element element)

v

public java.lang.String v(java.lang.String xpathExpression)

get

public java.lang.Object get(java.lang.String xpathExpression)
Description copied from class: DynamideObject
Subclasses can override this.

Specified by:
get in interface IGet
Overrides:
get in class DynamideObject

valueOfAll

public java.lang.String valueOfAll(java.lang.String xpathExpression)
Uses the DefaultStoreName, if set.


valueOfAll

public java.lang.String valueOfAll(java.lang.String storeName,
                                   java.lang.String xpathExpression)

valueOfAll

public java.lang.String valueOfAll(org.jdom.Element element,
                                   java.lang.String xpathExpression)

xdbElement

public XDBElement xdbElement(org.jdom.Element el)

first

public XDBElement first(org.jdom.Element el)

first

public XDBElement first(java.lang.String xpath)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright 2001-2013 DYNAMIDE.COM. All Rights Reserved.