jadex.swing.sequence
Class SequenceModel

java.lang.Object
  |
  +--jadex.swing.sequence.SequenceModel

public class SequenceModel
extends java.lang.Object

This is the data model for SequenceDisplay. By using JDOM API, the data model is rather simple compared to other ways.


Constructor Summary
SequenceModel()
          Default constructor
SequenceModel(SequenceFetcher fetcher)
          Second constructor
 
Method Summary
 org.jdom.Document getDocument()
          Get the xml document from fetcher.
 SequenceFetcher getFetcher()
          Get the data source.
 org.jdom.Namespace getNamespace()
          Get the namespace of this document
 org.jdom.Element getRoot()
          Get the root element.
 boolean isLeaf(org.jdom.Element node)
          Check if the element is a lead
 org.jdom.Element search(java.lang.String name)
          Search a specific sequence element by its name.
 void setFetcher(SequenceFetcher fetcher)
          Set the datasouce for this SequenceModel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceModel

public SequenceModel()
Default constructor

SequenceModel

public SequenceModel(SequenceFetcher fetcher)
Second constructor
Parameters:
fetcher - data producer
Method Detail

setFetcher

public void setFetcher(SequenceFetcher fetcher)
Set the datasouce for this SequenceModel.
Parameters:
fetcher - the data producer

getFetcher

public SequenceFetcher getFetcher()
Get the data source.
Returns:
the data source for this SequenceModel.

isLeaf

public boolean isLeaf(org.jdom.Element node)
Check if the element is a lead
Parameters:
node - the checked element
Returns:
result

getRoot

public org.jdom.Element getRoot()
Get the root element.
Returns:
root element.

getDocument

public org.jdom.Document getDocument()
Get the xml document from fetcher.

getNamespace

public org.jdom.Namespace getNamespace()
Get the namespace of this document

search

public org.jdom.Element search(java.lang.String name)
Search a specific sequence element by its name.
Parameters:
name - the seached name of the sequence
Returns:
the found sequence element. If ot found, return null