Jeospace API

org.jeospace.simulation
Class Atlas

java.lang.Object
  extended byorg.jeospace.simulation.Atlas

public class Atlas
extends java.lang.Object

A simulation environment configuration object that contains descriptors of content.

Version:
$Revision: 1.1.1.1 $
Author:
Rex Melton
See Also:
AtlasEvent, AtlasListener, List, Marshal, NodeList, Document, Element

Constructor Summary
Atlas()
          Construct a new empty atlas
Atlas(org.w3c.dom.Document document)
          Construct an atlas initialized from the argument xml document
 
Method Summary
 void addAtlasListener(AtlasListener al)
          Add a listener to this atlas
 void addElement(org.w3c.dom.Element e)
          Add the argument Element to the atlas document, firing an AtlasEvent as necessary.
protected  void fireAtlasEvent(int id, org.w3c.dom.Element arg)
          Deliver events to the listeners
static boolean getDisplayStatus(org.w3c.dom.Element e)
          Return the display status of the argument element
 org.w3c.dom.Document getDocument()
          Return the atlas document.
 org.w3c.dom.Element getElementByAttribute(java.lang.String elementName, java.lang.String attrName, java.lang.String attrValue)
          Return the first instance of an atlas Element with the argument tag name and matching attribute name and value.
 org.w3c.dom.NodeList getElements(java.lang.String elementName)
          Return the NodeList of atlas Elements with the argument tag name.
 java.util.List getElementsByAttribute(java.lang.String elementName, java.lang.String attrName, java.lang.String attrValue)
          Return the list of atlas Elements with the argument tag name and matching attribute name and value.
 boolean getLoadStatus()
          Return the load status
 Marshal getMarshaler()
          Return the Marshal object associated with this atlas
 java.lang.String getName()
          Return the atlas name
 java.lang.Class getOwner()
          Return the identifier of the owner of this atlas
 org.w3c.dom.Element importElement(org.w3c.dom.Element e)
          Return the Element cooresponding to the argument, that has been 'imported' into the atlas's document.
 boolean isModified()
          Return a flag indicating if this atlas has been modified from it's original state.
 boolean isOwned()
          Return a flag indicating that this atlas is owned (locked)
 void removeAtlasListener(AtlasListener al)
          Remove a listener from this atlas
 void removeElement(org.w3c.dom.Element e)
          Remove the argument Element from the atlas document, firing an AtlasEvent as necessary.
 void setDisplayStatus(org.w3c.dom.Element e, boolean status)
          Set the display status attribute of the argument element
 void setLoadStatus(boolean value)
          Set the load status
 void setName(java.lang.String value)
          Set the atlas name
 void setOwner(java.lang.Class value)
          Set the identifier of the owner of this atlas
static void setState(java.lang.String attr, org.w3c.dom.Element e, boolean state)
          Set the specified attribute of the argument element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Atlas

public Atlas()
Construct a new empty atlas


Atlas

public Atlas(org.w3c.dom.Document document)
Construct an atlas initialized from the argument xml document

Method Detail

getName

public java.lang.String getName()
Return the atlas name

Returns:
the atlas name

setName

public void setName(java.lang.String value)
Set the atlas name

Parameters:
value - the new atlas name

getLoadStatus

public boolean getLoadStatus()
Return the load status

Returns:
the load status

setLoadStatus

public void setLoadStatus(boolean value)
Set the load status

Parameters:
value - the new load status

getOwner

public java.lang.Class getOwner()
Return the identifier of the owner of this atlas

Returns:
the identifier of the owner of this atlas

setOwner

public void setOwner(java.lang.Class value)
Set the identifier of the owner of this atlas

Parameters:
value - the identifier of the owner of this atlas

isOwned

public boolean isOwned()
Return a flag indicating that this atlas is owned (locked)

Returns:
true if this atlas is currently owned (locked), false otherwise.

getMarshaler

public Marshal getMarshaler()
Return the Marshal object associated with this atlas

Returns:
the Marshal object associated with this atlas

isModified

public boolean isModified()
Return a flag indicating if this atlas has been modified from it's original state. true if the atlas content, identification or state variables have changed, false otherwise.


getElements

public org.w3c.dom.NodeList getElements(java.lang.String elementName)
Return the NodeList of atlas Elements with the argument tag name.

Parameters:
elementName - the tag name of the Elements to return
Returns:
the list of Elements matching the tag name

getElementsByAttribute

public java.util.List getElementsByAttribute(java.lang.String elementName,
                                             java.lang.String attrName,
                                             java.lang.String attrValue)
Return the list of atlas Elements with the argument tag name and matching attribute name and value.

Parameters:
elementName - the tag name of the Elements to return
attrName - the attribute name to match
attrValue - the attribute value to match
Returns:
the list of matching Elements

getElementByAttribute

public org.w3c.dom.Element getElementByAttribute(java.lang.String elementName,
                                                 java.lang.String attrName,
                                                 java.lang.String attrValue)
Return the first instance of an atlas Element with the argument tag name and matching attribute name and value.

Parameters:
elementName - the tag name of the Element to return
attrName - the attribute name to match
attrValue - the attribute value to match
Returns:
the first matching Element

importElement

public org.w3c.dom.Element importElement(org.w3c.dom.Element e)
Return the Element cooresponding to the argument, that has been 'imported' into the atlas's document. Note: This is a deep copy of the argument that has NOT been added to the atlas.

Parameters:
e - the argument Element
Returns:
the imported Element

addElement

public void addElement(org.w3c.dom.Element e)
Add the argument Element to the atlas document, firing an AtlasEvent as necessary.

Parameters:
e - the argument Element

removeElement

public void removeElement(org.w3c.dom.Element e)
Remove the argument Element from the atlas document, firing an AtlasEvent as necessary.

Parameters:
e - the argument Element

addAtlasListener

public void addAtlasListener(AtlasListener al)
Add a listener to this atlas

Parameters:
al - the AtlasListener

removeAtlasListener

public void removeAtlasListener(AtlasListener al)
Remove a listener from this atlas

Parameters:
al - the AtlasListener

fireAtlasEvent

protected void fireAtlasEvent(int id,
                              org.w3c.dom.Element arg)
Deliver events to the listeners

Parameters:
id - the AtlasEvent id
arg - the atlas Element that is the subject of the event

getDocument

public org.w3c.dom.Document getDocument()
Return the atlas document.

Returns:
the atlas document.

setDisplayStatus

public void setDisplayStatus(org.w3c.dom.Element e,
                             boolean status)
Set the display status attribute of the argument element

Parameters:
e - the argument Element to set the display status of
status - the status

getDisplayStatus

public static boolean getDisplayStatus(org.w3c.dom.Element e)
Return the display status of the argument element

Parameters:
e - the argument Element to get the display status of
Returns:
the display status

setState

public static void setState(java.lang.String attr,
                            org.w3c.dom.Element e,
                            boolean state)
Set the specified attribute of the argument element

Parameters:
attr - the attribute name
e - the argument Element to set the state of
state - the state

Jeospace API

Copyright © 2006 - jeospace.org