Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openxri.xml
Class XRDS

    java.lang.Object
      org.openxri.xml.XRDS

All Implemented Interfaces:
  java.io.Serializable

    public class XRDS

extends java.lang.Object
implements java.io.Serializable

This class describes the XRDS XML element used for XRI Authority resolution.

Author:
  =chetan
See Also:
  Serialized Form

Constructor Summary
`XRDS()` Contructs an emtpy XRDS element
`XRDS(org.w3c.dom.Element oElem, boolean bKeepXRIDDOMs)` This creates the object from DOM and optionally preserves the DOM of the XRD child elements.

Method Summary
`void` | `add(XRD oDescriptor)` Adds an XRD element
`void` | `add(XRDS oDescriptor)` Adds a nested XRDS element
`void` | `addAll(XRDS other)`
`void` | `clearDOM()` Clears any DOM that has been stored with this object
`java.lang.String` | `dump()` Returns object as a formatted XML string.
`void` | `fromDOM(org.w3c.dom.Element oElem, boolean bKeepXRIDDOMs)` This populates the object from DOM and optionally preserves the DOM of the XRD child elements.
`XRD` | `getDescriptorAt(int n)` Returns the XRD at the given index
`XRD` | `getFinalXRD()`
`XRDS` | `getFinalXRDS()`
`int` | `getNumChildren()` Returns the number of XRDs + XRDSs
`int` | `getNumXRD()` Gets the number or `XRD` elements among its children
`int` | `getNumXRDS()` Gets the number of `XRDS` elements among its children.
`java.lang.String` | `getRedirect()`
`java.lang.String` | `getRef()`
`XRDS` | `getXRDSAt(int n)` Returns the XRD at the given index
`boolean` | `isXRDAt(int n)`
`boolean` | `isXRDSAt(int n)`
`protected void` | `removeChildAt(int i)`
`void` | `replaceFinalXRD(XRDS children)`
`void` | `reset()` This method resets the state of the object.
`java.lang.String` | `serializeDescriptorDOM()` Serializes the object based on calling serializeDOM(false, true) on each of the child XRDS
`void` | `setRedirect(java.lang.String redirect)`
`void` | `setRef(java.lang.String ref)`
`org.w3c.dom.Element` | `toDOM(org.w3c.dom.Document oDoc)` This method will make DOM using the specified document.
`java.lang.String` | `toString()` Returns formatted object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### XRDS

    public XRDS()

  Contructs an emtpy XRDS element

### XRDS

    public XRDS(org.w3c.dom.Element oElem,
                boolean bKeepXRIDDOMs)
         throws java.net.URISyntaxException,
                java.text.ParseException

  This creates the object from DOM and optionally preserves the DOM of the XRD child elements.

  Parameters:
    `bKeepXRIDDOMs` - - Whether or not the XRDS should keep a copy of their DOM after construction.
  Throws:
    `java.net.URISyntaxException`
    `java.text.ParseException`

Method Detail

### add

    public void add(XRD oDescriptor)

  Adds an XRD element

### add

    public void add(XRDS oDescriptor)

  Adds a nested XRDS element

### addAll

    public void addAll(XRDS other)

### getNumChildren

    public int getNumChildren()

  Returns the number of XRDs + XRDSs

### getNumXRD

    public int getNumXRD()

  Gets the number or `XRD` elements among its children

### getNumXRDS

    public int getNumXRDS()

  Gets the number of `XRDS` elements among its children. This indicates the number of Refs followed.

### getDescriptorAt

    public XRD getDescriptorAt(int n)

  Returns the XRD at the given index

### getXRDSAt

    public XRDS getXRDSAt(int n)

  Returns the XRD at the given index

### isXRDSAt

    public boolean isXRDSAt(int n)

### isXRDAt

    public boolean isXRDAt(int n)

### reset

    public void reset()

  This method resets the state of the object.

### fromDOM

    public void fromDOM(org.w3c.dom.Element oElem,
                        boolean bKeepXRIDDOMs)
                 throws java.text.ParseException,
                        java.net.URISyntaxException

  This populates the object from DOM and optionally preserves the DOM of the XRD child elements.

  Parameters:
    `bKeepXRIDDOMs` - - Whether or not the XRDS should keep a copy of their DOM after construction.
  Throws:
    `java.text.ParseException`
    `java.net.URISyntaxException`

### toDOM

    public org.w3c.dom.Element toDOM(org.w3c.dom.Document oDoc)

  This method will make DOM using the specified document. If any DOM state has been stored with the object, it will not be used in this method. This method generates a reference-free copy of new DOM.

  Parameters:
    `oDoc` - - The document to use for generating DOM

### clearDOM

    public void clearDOM()

  Clears any DOM that has been stored with this object

### serializeDescriptorDOM

    public java.lang.String serializeDescriptorDOM()

  Serializes the object based on calling serializeDOM(false, true) on each of the child XRDS

### toString

    public java.lang.String toString()

  Returns formatted object. Do not use if signature needs to be preserved.

  Overrides:
    `toString` in class `java.lang.Object`

### dump

    public java.lang.String dump()

  Returns object as a formatted XML string.

  Parameters:
    `sTab` - - The characters to prepend before each new line

### getFinalXRD

    public XRD getFinalXRD()

### getFinalXRDS

    public XRDS getFinalXRDS()

### replaceFinalXRD

    public void replaceFinalXRD(XRDS children)

### removeChildAt

    protected void removeChildAt(int i)

### getRef

    public java.lang.String getRef()

  Returns:
    Returns the ref.

### setRef

    public void setRef(java.lang.String ref)

  Parameters:
    `ref` - The ref to set.

### getRedirect

    public java.lang.String getRedirect()

  Returns:
    Returns the redirect attribute.

### setRedirect

    public void setRedirect(java.lang.String redirect)

  Parameters:
    `ref` - The redirect attribute value to set.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2009. All Rights Reserved.