sdlip.helpers
Class NestedAttribute

java.lang.Object
  |
  +--sdlip.helpers.NestedAttribute

public class NestedAttribute
extends java.lang.Object

NestedAttribute represents a flat list of XML elements. For example, nested attribute

   <coordinate>
     <x/>
   </coordinate>
 
is represented by an element vector
   coordinate, x
 
NestedAttributes can be collected from the list of document properties requested by the client, or from the metadata returned by the client using the method collectAttributes. This class can also be used to filter out the attributes requested by the client from a complete document/resource description using matchDoc.


Constructor Summary
NestedAttribute(java.util.Enumeration en)
           
NestedAttribute(java.util.Vector v)
           
 
Method Summary
static java.util.Vector collectAttributes(Element e)
          Collects a vector of NestedAttributes from metadata inside SDLIP:propList tag.
 Element elementAt(int i)
           
 Element getLast()
          returns the last element in the list
static java.lang.String getName(java.lang.String name)
           
 Element getNestedElements()
          returns a nested representation of the element list
static java.lang.String getNS(java.lang.String name)
           
 java.lang.String getPropDesc()
           
 java.lang.String getPropName()
           
 boolean isRetrievable()
          Whether attribute is retrievable
 boolean isSearchable()
          Whether attribute is searchable
static Element match(java.util.Vector attrs, Element e)
          Copies from ePropList a subset of values that match attributes listed in attrs.
static Element matchDoc(java.util.Vector attrs, Element eDoc)
          Returns a subset of attributes from eDoc that match NestedAttributes in attrs
 java.util.Enumeration matchValues(Element e)
          Returns an enumeration of values for the NestedAttribute found inside the given XML element
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NestedAttribute

public NestedAttribute(java.util.Vector v)

NestedAttribute

public NestedAttribute(java.util.Enumeration en)
Method Detail

getLast

public Element getLast()
returns the last element in the list

elementAt

public Element elementAt(int i)

size

public int size()

getNestedElements

public Element getNestedElements()
returns a nested representation of the element list

getNS

public static java.lang.String getNS(java.lang.String name)

getName

public static java.lang.String getName(java.lang.String name)

getPropName

public java.lang.String getPropName()

getPropDesc

public java.lang.String getPropDesc()

collectAttributes

public static java.util.Vector collectAttributes(Element e)
Collects a vector of NestedAttributes from metadata inside SDLIP:propList tag.

isSearchable

public boolean isSearchable()
Whether attribute is searchable

isRetrievable

public boolean isRetrievable()
Whether attribute is retrievable

matchDoc

public static Element matchDoc(java.util.Vector attrs,
                               Element eDoc)
Returns a subset of attributes from eDoc that match NestedAttributes in attrs

match

public static Element match(java.util.Vector attrs,
                            Element e)
Copies from ePropList a subset of values that match attributes listed in attrs. Use this function for selective delivery of results to the client. Pass propList element as parameter.

matchValues

public java.util.Enumeration matchValues(Element e)
Returns an enumeration of values for the NestedAttribute found inside the given XML element

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object