com.novell.nds.dirxml.driver.xds
Class XDSInitDocument

java.lang.Object
  extended bycom.novell.nds.dirxml.driver.xds.DocumentImpl
      extended bycom.novell.nds.dirxml.driver.xds.XDSInitDocument
All Implemented Interfaces:
ReadableDocument, XDSDocument

public class XDSInitDocument
extends DocumentImpl
implements ReadableDocument

The XmlDocument passed to method init(XmlDocument) of interfaces DriverShim, PublicationShim, and SubscriptionShim and the getSchema(XmlDocument) method of interface DriverShim.


Constructor Summary
XDSInitDocument(com.novell.nds.dirxml.driver.XmlDocument xdsXML)
          Constructs a readable init document from an existing XDS-formatted, XML document.
 
Method Summary
 List childElements()
          Returns the child elements of this document's <input> element.
 String containerDN()
          Returns the container RDN (Relative Distinguished Name) from this document's <init-params> element's src-dn attribute value.
 com.novell.nds.dirxml.driver.DriverFilter driverFilter()
          Returns this document's filter.
 XDSInitParamsElement extractInitParamsElement()
          Returns this document's first <init-params> element.
 XDSSourceElement extractSourceElement()
          Returns this document's <source> element.
 DTDVersion getDTDVersion()
          Returns the dtdversion attribute value from this document's <nds> element.
 void parameters(Map params)
          Returns parameter values from this document's <authentication-info>, <driver-options>, <driver-state>, <subscriber-options>, <subscriber-state>, <publisher-options>, and <publisher-state> elements.
 String rdn()
          Returns the right-most RDN (Relative Distinguished Name) from this document's <init-params> element's srcDN attribute value.
 String srcDN()
          Gets the value of this document's <init-params> element's srcDN attribute value.
 String treeName()
          Returns the left-most RDN from this document's <init-params> element's src-dn attribute value.
 
Methods inherited from class com.novell.nds.dirxml.driver.xds.DocumentImpl
domDocument, domIOElement, domNDSElement, isEmpty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.novell.nds.dirxml.driver.xds.XDSDocument
domDocument, domIOElement, domNDSElement, isEmpty
 

Constructor Detail

XDSInitDocument

public XDSInitDocument(com.novell.nds.dirxml.driver.XmlDocument xdsXML)
                throws XDSParseException
Constructs a readable init document from an existing XDS-formatted, XML document.

This constructor should be used to parse documents passed to method init(XmlDocument) of interfaces DriverShim, SubscriptionShim, and PublicationShim.

Parameters:
xdsXML - the XML document to parse; must not be null
Throws:
XDSParseException - thrown if xdsXML is empty, malformed, or invalid
See Also:
SkeletonDriverShim.init(XmlDocument), SkeletonSubscriptionShim.init(XmlDocument), SkeletonPublicationShim.init(XmlDocument)
Method Detail

extractSourceElement

public XDSSourceElement extractSourceElement()
Description copied from interface: ReadableDocument
Returns this document's <source> element.

Invocation Context:
READ

Specified by:
extractSourceElement in interface ReadableDocument
Returns:
may return null

driverFilter

public com.novell.nds.dirxml.driver.DriverFilter driverFilter()
Returns this document's filter. If there is no filter, an empty filter is returned.

Invocation Context:
READ

Returns:
will not return null

srcDN

public String srcDN()
Gets the value of this document's <init-params> element's srcDN attribute value.

Invocation Context:
READ

Returns:
may return null; will not return ""

rdn

public String rdn()
Returns the right-most RDN (Relative Distinguished Name) from this document's <init-params> element's srcDN attribute value. The naming RDN is the instance name of the driver, publisher, or subscriber object.

Invocation Context:
READ

Returns:
may be null; will not return ""

treeName

public String treeName()
Returns the left-most RDN from this document's <init-params> element's src-dn attribute value. This is the tree name.

Invocation Context:
READ

Returns:
may return null; will not return ""

containerDN

public String containerDN()
Returns the container RDN (Relative Distinguished Name) from this document's <init-params> element's src-dn attribute value. This is the driver set or driver DN.

Invocation Context:
READ

Returns:
may return null; will not return ""

parameters

public void parameters(Map params)
                throws XDSParameterException
Returns parameter values from this document's <authentication-info>, <driver-options>, <driver-state>, <subscriber-options>, <subscriber-state>, <publisher-options>, and <publisher-state> elements.

In order to retrieve parameters at the document level, parameter tag names must be globally unique. If parameter tag names are not unique within a document, parameters must be retrieved through their respective parent elements.

Invocation Context:
READ

Parameters:
params - the map of Parameter objects to extract; must not be null
Throws:
XDSParameterException - if a parameter constraint is violated or parameter tag names are not unique
See Also:
ParamParent.parameters(Map)

getDTDVersion

public DTDVersion getDTDVersion()
Description copied from interface: ReadableDocument
Returns the dtdversion attribute value from this document's <nds> element.

Invocation Context:
READ

Specified by:
getDTDVersion in interface ReadableDocument
Returns:
will not return null; if absent, this method returns DTDVersion.UNKNOWN

extractInitParamsElement

public XDSInitParamsElement extractInitParamsElement()
Returns this document's first <init-params> element.

Invocation Context:
READ

Returns:
will not return null; while this element is strictly optional under the DTD, a driver cannot function without it

childElements

public List childElements()
Returns the child elements of this document's <input> element.

Usage Notes:
The types of objects returned by this method may be extended in the future. Thus, callers should be able to handle object types other than those listed in the returns field below.
Invocation Context:
READ

Specified by:
childElements in interface ReadableDocument
Returns:
a list of XDSInitParamsElement and NonXDSElement objects; will not return null