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

Quick Search    Search Deep

org.jdaemon.era.xml
Class AbstractXMLCube  view AbstractXMLCube download AbstractXMLCube.java

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byorg.jdaemon.era.AbstractCube
          extended byorg.jdaemon.era.xml.AbstractXMLCube
All Implemented Interfaces:
java.util.Collection, org.jdaemon.era.Cube, java.lang.Iterable, XMLCube
Direct Known Subclasses:
FilteredXMLCube

public abstract class AbstractXMLCube
extends org.jdaemon.era.AbstractCube
implements XMLCube

Abstract implementation of XMLCube. Extends AbstractCube (for completeness -- even though it does not reuse much -- may have to revise this class or AbstractCube). Note that AbstractCube more closely matches the requirements of the JavaCube than the XMLCube.


Nested Class Summary
 
Nested classes inherited from class org.jdaemon.era.AbstractCube
 
Field Summary
protected  org.jdaemon.era.CubeDescriptor descriptor
          Descriptor containing meta data about Cube
private static org.apache.log4j.Logger log
          Logger
protected  org.w3c.dom.Document xmlDoc
          XML DOM tree
protected  java.lang.String xmlString
           
 
Fields inherited from class org.jdaemon.era.AbstractCube
 
Fields inherited from interface org.jdaemon.era.Cube
EQUAL, GREATER, GREATER_OR_EQUAL, LAST_OPERAND, LESS, LESS_OR_EQUAL
 
Constructor Summary
AbstractXMLCube()
           
 
Method Summary
 boolean add(java.lang.Object object)
          Not currently supported by XML cubes
 void addAll(org.jdaemon.era.Cube results)
          Generic method for adding data from an existing Cube (of whatever flavor) to this XMLCube in the form of an XML DOM tree.
protected  org.w3c.dom.Node addXMLNode(org.w3c.dom.Document xmlDoc, org.w3c.dom.Node parent, java.lang.String elementName)
          Helper method for adding elements to parent nodes
protected  org.w3c.dom.Node addXMLNode(org.w3c.dom.Document xmlDoc, org.w3c.dom.Node parent, java.lang.String elementName, java.util.Map attributes)
          Helper method for adding elements to parent nodes
protected  org.w3c.dom.Node addXMLNode(org.w3c.dom.Document xmlDoc, org.w3c.dom.Node parent, java.lang.String elementName, java.util.Map attributes, java.lang.String value)
          Helper method for adding elements to parent nodes
protected  org.w3c.dom.Node addXMLNode(org.w3c.dom.Document xmlDoc, org.w3c.dom.Node parent, java.lang.String elementName, java.lang.String nameAttribute)
          Helper method for adding elements to parent nodes
protected  org.w3c.dom.Node addXMLNode(org.w3c.dom.Document xmlDoc, org.w3c.dom.Node parent, java.lang.String elementName, java.lang.String nameAttribute, java.lang.String value)
          Helper method for adding elements to parent nodes
 org.jdaemon.era.Cube constrain(org.jdaemon.era.Filter filter)
          Create new cube containing a subset of the values in this Cube
 org.jdaemon.era.Cube constrain(java.lang.String attribute, int operator, java.lang.Object operand)
          Create new cube containing a subset of the values in this Cube
 java.lang.Object getAttribute(java.lang.String attribute, java.lang.Object object)
          Not currently supported by XML cubes
 java.util.SortedSet getAttributeSet(java.lang.String attribute)
          Not currently supported by XML cubes
 org.jdaemon.era.CubeDescriptor getDescriptor()
          Get metadata describing this cube.
 XMLFilter getFilter(java.lang.String attribute, int constraintType, java.lang.Object value)
          Obtain a filter object for use in a constrained cube (e.g.
 java.lang.Object getMax(java.lang.String dimension)
          Not currently supported by XML cubes
 java.lang.Object getMin(java.lang.String dimension)
          Not currently supported by XML cubes
 double getSum(java.lang.String attribute)
          Not currently supported by XML cubes
 org.w3c.dom.Document getXmlDoc()
          Retrieve handle on internal XML document representation.
 java.lang.String getXmlString()
          Retrieve handle on internal XML String representation.
 java.util.Iterator groupBy(java.lang.String attribute)
          Not currently supported by XML cubes
 java.util.Iterator iterator()
          Not currently supported by XML cubes
 int size()
          Get the number of elements in this collection.
 
Methods inherited from class org.jdaemon.era.AbstractCube
getComparator, union
 
Methods inherited from class java.util.AbstractCollection
addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jdaemon.era.xml.XMLCube
getFilterChain, getXML
 
Methods inherited from interface org.jdaemon.era.Cube
union
 
Methods inherited from interface java.util.Collection
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

log

private static org.apache.log4j.Logger log
Logger


xmlDoc

protected org.w3c.dom.Document xmlDoc
XML DOM tree


xmlString

protected java.lang.String xmlString

descriptor

protected org.jdaemon.era.CubeDescriptor descriptor
Descriptor containing meta data about Cube

Constructor Detail

AbstractXMLCube

public AbstractXMLCube()
Method Detail

constrain

public org.jdaemon.era.Cube constrain(org.jdaemon.era.Filter filter)
Create new cube containing a subset of the values in this Cube

Specified by:
constrain in interface org.jdaemon.era.Cube

constrain

public org.jdaemon.era.Cube constrain(java.lang.String attribute,
                                      int operator,
                                      java.lang.Object operand)
Create new cube containing a subset of the values in this Cube

Specified by:
constrain in interface org.jdaemon.era.Cube

getFilter

public XMLFilter getFilter(java.lang.String attribute,
                           int constraintType,
                           java.lang.Object value)
Obtain a filter object for use in a constrained cube (e.g. FilteredXMLCube)

Specified by:
getFilter in interface XMLCube

addAll

public void addAll(org.jdaemon.era.Cube results)
Generic method for adding data from an existing Cube (of whatever flavor) to this XMLCube in the form of an XML DOM tree. It makes heavy use of the meta data stored in the Descriptor of that Cube.

Specified by:
addAll in interface org.jdaemon.era.Cube

getXmlDoc

public org.w3c.dom.Document getXmlDoc()
Retrieve handle on internal XML document representation. Needed for getXML() method implementation

Specified by:
getXmlDoc in interface XMLCube

getXmlString

public java.lang.String getXmlString()
Retrieve handle on internal XML String representation. Needed for getXML() method implementation

Specified by:
getXmlString in interface XMLCube

addXMLNode

protected org.w3c.dom.Node addXMLNode(org.w3c.dom.Document xmlDoc,
                                      org.w3c.dom.Node parent,
                                      java.lang.String elementName,
                                      java.util.Map attributes,
                                      java.lang.String value)
Helper method for adding elements to parent nodes


addXMLNode

protected org.w3c.dom.Node addXMLNode(org.w3c.dom.Document xmlDoc,
                                      org.w3c.dom.Node parent,
                                      java.lang.String elementName,
                                      java.util.Map attributes)
Helper method for adding elements to parent nodes


addXMLNode

protected org.w3c.dom.Node addXMLNode(org.w3c.dom.Document xmlDoc,
                                      org.w3c.dom.Node parent,
                                      java.lang.String elementName)
Helper method for adding elements to parent nodes


addXMLNode

protected org.w3c.dom.Node addXMLNode(org.w3c.dom.Document xmlDoc,
                                      org.w3c.dom.Node parent,
                                      java.lang.String elementName,
                                      java.lang.String nameAttribute,
                                      java.lang.String value)
Helper method for adding elements to parent nodes


addXMLNode

protected org.w3c.dom.Node addXMLNode(org.w3c.dom.Document xmlDoc,
                                      org.w3c.dom.Node parent,
                                      java.lang.String elementName,
                                      java.lang.String nameAttribute)
Helper method for adding elements to parent nodes


size

public int size()
Description copied from interface: java.util.Collection
Get the number of elements in this collection.

Specified by:
size in interface java.util.Collection

getDescriptor

public org.jdaemon.era.CubeDescriptor getDescriptor()
Description copied from interface: org.jdaemon.era.Cube
Get metadata describing this cube.

Specified by:
getDescriptor in interface org.jdaemon.era.Cube

getMax

public java.lang.Object getMax(java.lang.String dimension)
Not currently supported by XML cubes

Specified by:
getMax in interface org.jdaemon.era.Cube

getMin

public java.lang.Object getMin(java.lang.String dimension)
Not currently supported by XML cubes

Specified by:
getMin in interface org.jdaemon.era.Cube

getSum

public double getSum(java.lang.String attribute)
Not currently supported by XML cubes

Specified by:
getSum in interface org.jdaemon.era.Cube

groupBy

public java.util.Iterator groupBy(java.lang.String attribute)
Not currently supported by XML cubes

Specified by:
groupBy in interface org.jdaemon.era.Cube

getAttribute

public java.lang.Object getAttribute(java.lang.String attribute,
                                     java.lang.Object object)
Not currently supported by XML cubes

Specified by:
getAttribute in interface org.jdaemon.era.Cube

getAttributeSet

public java.util.SortedSet getAttributeSet(java.lang.String attribute)
Not currently supported by XML cubes

Specified by:
getAttributeSet in interface org.jdaemon.era.Cube

iterator

public java.util.Iterator iterator()
Not currently supported by XML cubes

Specified by:
iterator in interface org.jdaemon.era.Cube

add

public boolean add(java.lang.Object object)
Not currently supported by XML cubes

Specified by:
add in interface java.util.Collection