acedb::Aceobj Class Reference

List of all members.

Public Member Functions

 Aceobj ()
 Aceobj (String objdump)
 Aceobj (AceobjNode node)
void make (String aceDump)
void print ()
String getAceClass ()
String type ()
String name ()
String toString ()
boolean isTag ()
Vector tags ()
Aceobj right ()
Aceobj down ()
Aceobj at (String tag_path) throws AceException
Aceobj get (String tag)

Protected Member Functions

AceobjNode searchDown (AceobjNode subtree, String tag) throws AceException

Static Protected Member Functions

static void print (AceobjNode o)
static AceobjNode find (AceobjNode n, String tag)

Private Attributes

AceobjNode tree = null

Classes

class  AceobjNode
class  DumpStore


Detailed Description

The Aceobj objects are constructed by the Ace class. It is internally represented by a genreal tree suited for the Ace model. It does not have any database functions as defined in the AcePerl interface. For database functions use the Ace class.

Author:
Kemin Zhou
Version:
1.1

Constructor & Destructor Documentation

acedb::Aceobj::Aceobj (  )  [inline]

Construct an empty object.

Referenced by at(), down(), get(), and right().

acedb::Aceobj::Aceobj ( String  objdump  )  [inline]

Construct a full Aceobj from the acedump, should implement construction one line at time ON-DEMAND for efficiency. Most object operations don't need the whole object and the object construction is very expensive!

References make().

acedb::Aceobj::Aceobj ( AceobjNode  node  )  [inline]

construct an object from a tree node.

References tree.


Member Function Documentation

void acedb::Aceobj::make ( String  aceDump  )  [inline]

make an object out of ace dump string.

Parameters:
aceDump is the dump from one object dump only something is wrong with the logic here. Need to fix add pointer array to help to construct the tree.

References acedb::Aceobj::AceobjNode::down, acedb::Aceobj::DumpStore::getTabCount(), acedb::Aceobj::DumpStore::nextBranch(), acedb::Aceobj::AceobjNode::parent, acedb::Aceobj::AceobjNode::right, and tree.

Referenced by Aceobj().

static void acedb::Aceobj::print ( AceobjNode  o  )  [inline, static, protected]

dump out the node type:value, same format as ACE model. This is not working right yet.

References acedb::Aceobj::AceobjNode::down, print(), acedb::Aceobj::AceobjNode::right, acedb::Aceobj::AceobjNode::type, and acedb::Aceobj::AceobjNode::value.

void acedb::Aceobj::print (  )  [inline]

print the object tree, row first.

References tree.

Referenced by print().

static AceobjNode acedb::Aceobj::find ( AceobjNode  n,
String  tag 
) [inline, static, protected]

A search function, not to be used by the public.

References acedb::Aceobj::AceobjNode::down, acedb::Aceobj::AceobjNode::right, acedb::Aceobj::AceobjNode::type, and acedb::Aceobj::AceobjNode::value.

Referenced by get().

String acedb::Aceobj::getAceClass (  )  [inline]

return the Ace class type such as Sequence, Paper, int,.

Returns:
String reprenting the calss type

References tree, and acedb::Aceobj::AceobjNode::type.

String acedb::Aceobj::type (  )  [inline]

return the ace class type

References tree, and acedb::Aceobj::AceobjNode::type.

String acedb::Aceobj::name (  )  [inline]

return the value of the class, such as Sequence, Paper, etc

References tree, and acedb::Aceobj::AceobjNode::value.

String acedb::Aceobj::toString (  )  [inline]

return the root's value as string

References tree, and acedb::Aceobj::AceobjNode::value.

Referenced by Fetchaceprt::dump(), Clusterdump::dump(), dumpClusterPrt::getDef(), and Fetchaceprt::getDef().

boolean acedb::Aceobj::isTag (  )  [inline]

Vector acedb::Aceobj::tags (  )  [inline]

return the top level tags as a vector.

Returns:
Vector of String type as tags names

References acedb::Aceobj::AceobjNode::down, acedb::Aceobj::AceobjNode::right, tree, and acedb::Aceobj::AceobjNode::value.

Aceobj acedb::Aceobj::right (  )  [inline]

low level tree traversal, will not follow into the database.

Returns:
a new Aceobj as a subtree of the parent object, or null if nothing follows

References Aceobj(), acedb::Aceobj::AceobjNode::right, and tree.

Referenced by Fetchaceprt::dump(), Clusterdump::dump(), dumpClusterPrt::getDef(), Fetchaceprt::getDef(), and Fetchaceprt::run().

Aceobj acedb::Aceobj::down (  )  [inline]

similar to right(), return a subtree of the parent

References Aceobj(), acedb::Aceobj::AceobjNode::down, and tree.

Aceobj acedb::Aceobj::at ( String  tag_path  )  throws AceException [inline]

take a tag path separated by dot (.). Such as Origin.from_species. To get the value of the tag you need to use the right function

Returns:
the object starting at tag, null if tag not found.

References Aceobj(), searchDown(), and tree.

Referenced by Fetchaceprt::dump(), Clusterdump::dump(), dumpClusterPrt::getDef(), Fetchaceprt::getDef(), and Fetchaceprt::run().

Aceobj acedb::Aceobj::get ( String  tag  )  [inline]

Search the object for the tag.

Returns:
the node as an Aceobj or null

References Aceobj(), find(), acedb::Aceobj::AceobjNode::right, and tree.

AceobjNode acedb::Aceobj::searchDown ( AceobjNode  subtree,
String  tag 
) throws AceException [inline, protected]

search the immediate right tags downward.

Returns:
returns null if not found

References acedb::Aceobj::AceobjNode::down, acedb::Aceobj::AceobjNode::isTag(), acedb::Aceobj::AceobjNode::right, and acedb::Aceobj::AceobjNode::value.

Referenced by at().


Member Data Documentation

AceobjNode acedb::Aceobj::tree = null [private]


The documentation for this class was generated from the following file:

Generated on Wed Oct 14 21:49:26 2009 for Softwares from Orpara by  doxygen 1.5.6