Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jdaemon.util.data
Class JavaDataRepresentation  view JavaDataRepresentation download JavaDataRepresentation.java

java.lang.Object
  extended byorg.jdaemon.util.data.JavaDataRepresentation
All Implemented Interfaces:
DataRepresentation

public class JavaDataRepresentation
extends java.lang.Object
implements DataRepresentation

Java Data Representation

Version:

Field Summary
private  java.util.TreeMap attributes
           
private  java.util.TreeMap children
           
private  java.lang.String type
           
 
Constructor Summary
JavaDataRepresentation(DataRepresentation other)
          Creates new JavaDataRepresentation
JavaDataRepresentation(java.lang.String type)
          Creates new JavaDataRepresentation
 
Method Summary
 java.lang.String getAttribute(java.lang.Object key)
          Return the value of an attribute
 java.util.Iterator getAttributeKeys()
          Return all the valid attribute keys within this representation
 DataRepresentation getElement(java.lang.Object key)
          Return a subset of the attributes in this representation
 java.util.Iterator getElementKeys()
          Return all the valid attribute keys within this representation
 java.lang.String getElementType()
          Return the type of data in this representation
 DataRepresentation newElement(java.lang.String type)
          Create a new, empty element (not a member of this or any parent representation)
 void setAttribute(java.lang.Object key, java.lang.String value)
          Set an attriubute of this representation
 void setElement(java.lang.Object key, DataRepresentation other)
          Add an element to this representation with the given key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

private java.lang.String type

attributes

private java.util.TreeMap attributes

children

private java.util.TreeMap children
Constructor Detail

JavaDataRepresentation

public JavaDataRepresentation(java.lang.String type)
Creates new JavaDataRepresentation


JavaDataRepresentation

public JavaDataRepresentation(DataRepresentation other)
                       throws ReadError,
                              WriteError
Creates new JavaDataRepresentation

Method Detail

setElement

public void setElement(java.lang.Object key,
                       DataRepresentation other)
                throws WriteError,
                       ReadError
Add an element to this representation with the given key

Specified by:
setElement in interface DataRepresentation

setAttribute

public void setAttribute(java.lang.Object key,
                         java.lang.String value)
                  throws WriteError
Set an attriubute of this representation

Specified by:
setAttribute in interface DataRepresentation

getElement

public DataRepresentation getElement(java.lang.Object key)
                              throws ReadError
Return a subset of the attributes in this representation

Specified by:
getElement in interface DataRepresentation

getAttribute

public java.lang.String getAttribute(java.lang.Object key)
                              throws ReadError
Return the value of an attribute

Specified by:
getAttribute in interface DataRepresentation

getElementKeys

public java.util.Iterator getElementKeys()
                                  throws ReadError
Return all the valid attribute keys within this representation

Specified by:
getElementKeys in interface DataRepresentation

getAttributeKeys

public java.util.Iterator getAttributeKeys()
                                    throws ReadError
Return all the valid attribute keys within this representation

Specified by:
getAttributeKeys in interface DataRepresentation

getElementType

public java.lang.String getElementType()
                                throws ReadError
Return the type of data in this representation

Specified by:
getElementType in interface DataRepresentation

newElement

public DataRepresentation newElement(java.lang.String type)
Create a new, empty element (not a member of this or any parent representation)

Specified by:
newElement in interface DataRepresentation