Java Doc for StructureElement.java in  » Testing » jacareto » jacareto » struct » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » jacareto » jacareto.struct 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   jacareto.system.EnvironmentMember
      jacareto.struct.StructureElement

All known Subclasses:   jacareto.struct.SequenceElement,  jacareto.struct.HypertextActions,  jacareto.struct.MouseMotionOverHyperlink,  jacareto.struct.Sequence,  jacareto.struct.MouseMotionOverHyperlinks,  jacareto.struct.MultipleMouseClick,  jacareto.struct.ListSelectionChange,  jacareto.struct.MouseClick,  jacareto.struct.WindowActivationChange,  jacareto.struct.ShiftAndKeys,  jacareto.struct.RootElement,  jacareto.struct.WindowDeactivation,  jacareto.record.Recordable,  jacareto.struct.WindowOpened,  jacareto.struct.MouseEntered,  jacareto.struct.SymbolStructureElement,  jacareto.struct.HyperlinkChosen,  jacareto.struct.KeyTyped,  jacareto.struct.FocusChange,  jacareto.struct.WindowClosing,  jacareto.struct.MouseExited,  jacareto.struct.MouseChangedComponent,  jacareto.struct.MouseMotionOverComponents,  jacareto.struct.TabChange,  jacareto.struct.PopupMenuItemChosen,  jacareto.struct.ItemStateChange,  jacareto.struct.MouseDrag,  jacareto.struct.MenuOpenedAndClosed,  jacareto.struct.WindowActivation,  jacareto.struct.ModifiedKeySequence,  jacareto.struct.GroupStructureElement,  jacareto.struct.PopupMenuOpenedAndClosed,  jacareto.struct.ButtonActivated,  jacareto.struct.MenuOpened,  jacareto.struct.MouseMotion,  jacareto.struct.ScrollBarDrag,  jacareto.struct.ComponentsAdded,  jacareto.struct.WindowMoved,  jacareto.struct.MenuItemChosen,  jacareto.struct.InteractionModelStructureElement,  jacareto.struct.PopupMenuOpened,  jacareto.struct.MousePressedReleased,  jacareto.struct.KeySequence,
StructureElement
abstract public class StructureElement extends EnvironmentMember implements TreeNode,Cloneable(Code)
An element of a record structure. A structure element can parse a part of a record.
author:
   Christian Spannagel
version:
   1.04



Constructor Summary
public  StructureElement(Environment env, StructureElement parent, StructureElement[] children, boolean isStatic)
     Creates a new structure element with the given parent and the given children.
public  StructureElement(Environment env, StructureElement parent, StructureElement[] children)
     Creates a new structure element with the given parent and the given children.
public  StructureElement(Environment env)
     Creates a new structure element with no parent and no children and the given environment.
public  StructureElement(Environment env, StructureElement[] children)
     Creates a new structure element with no parent and given children.
public  StructureElement()
     Creates a structure element with no environment and no parent and children.

Method Summary
public  voidaddChild(StructureElement child)
     Adds a child to the current children.
public  voidaddChildren(StructureElement[] children)
     Adds an array of children.
protected  voidaddRecordablesToVector(Vector v)
     Adds all leave nodes belonging to the node's subtree to the given vector.
public  voidaddStructureElementListener(StructureElementListener listener)
    
public  voidcalculateDuration()
     Calculates the duration of the structure element.
public  Enumerationchildren()
    
public  IteratorchildrenIterator()
     Returns an iterator on the children of the structure element.
public  voidclearSearchResults()
     Clears the search results.
public  Objectclone()
     Clones a structure element.
protected  voidfireStructureElementEvent(StructureElementEvent event)
     Fires a structure element event to all listeners.
protected  voidfireValuesChanged()
     Fires a structure element event to all listeners which indicates that one or more values have been changed.
public  booleangetAllowsChildren()
     Returns true if the receiver allows children.
public  StructureElementgetChild(int index)
     Returns the child at the specified index.
public  TreeNodegetChildAt(int index)
    
public  intgetChildCount()
     Returns the number of children.
public  StructureElement[]getChildren()
     Returns the children as array.
public  StructureElement[]getChildren(String className)
     Returns all children of the structure element which are instances of the given class, in depth first search order.
public  intgetChildrenCount()
     Returns the number of the children.
public  StructureElement[]getClonedChildren()
     Returns a vector of all cloned children.
public  longgetDuration()
    
abstract public  StringgetElementDescription()
     Returns a description of the element.
abstract public  StringgetElementName()
     Returns the name of the element.
public  intgetIndex(TreeNode child)
     Returns the index of a given child.
public  TreeNodegetParent()
     Returns the parent of a structure element.
public  longgetProcTime()
     Returns the processing time of the structure element, if it has one, else 0 is returned.
public  Recordable[]getRecordables()
     Returns all leaf nodes of the node's subtree.
public  Recordable[]getRecordablesInRecordOrder(ReadAccessRecord record)
     Returns all leaf nodes of the node's subtree.
public  Recordable[]getRecordablesInRecordOrder()
     Returns all leaf nodes of the node's subtree.
public  RootElementgetRoot()
     Returns the root of this element.
protected  StringgetSearchString()
     Returns a string which is the basis for the search.
public  StructuregetStructure()
     Returns the structure this element belongs to.
public  StringgetUUIDString()
    
public  booleanhasChildren()
     Returns whether or not this element has children.
public  booleanhasProcTime()
     True, if this StructureElement has a processing time or is needed just for structuring purposes.
public  voidinsertChild(StructureElement child, int index)
     Inserts a child at a given index.
public  booleanisLeaf()
    
public  booleanisParentOfSearchHit()
     Returns whether or not the element is a parent element of a search hit.
public  booleanisSearchHit()
     Returns whether or not the element is a search hit.
public  booleanisStatic()
    
public static  StructureElementparse(Environment env, RecordTokenizer recordTokenizer)
     Parses a record which is tokenized by the given record tokenizer.
public  voidremoveAllChildren()
     Removes all children.
public  voidremoveChild(StructureElement child)
     Removes a child.
public  voidremoveChildrenCursorily()
    
public  voidremoveFromParent()
     Removes this node from its parent.
public  voidremoveStructureElementListener(StructureElementListener listener)
    
public  intsearch(RE re, String searchString)
     Searches for a string (regular expression match or string comparison).
public  voidsetChildren(StructureElement[] children)
     Sets the children.
public  voidsetChildrenCursorily(StructureElement[] children)
     Sets the children of the structure element without setting attribute values of the children.
public  voidsetDuration(long duration)
     Sets the duration.
public  voidsetNotificationEnabled(boolean isNotificationEnabled)
     Sets whether or not the element notifies listeners of changes.
public  voidsetParent(StructureElement parent)
     Sets the parent for this structure element.
public  voidsetProcTime(long processingTime)
     Sets the processing time of the structure element.
public  voidsetStructure(Structure structure)
     Sets the structure this element belongs to.
public  voidsetUUIDString(String string)
     Sets the UUID String for this StructureElement.
abstract public  StringtoShortString()
     Returns a String which describes the content of the element shortly.
public static  StructureElement[]vectorToArray(Vector v)
    


Constructor Detail
StructureElement
public StructureElement(Environment env, StructureElement parent, StructureElement[] children, boolean isStatic)(Code)
Creates a new structure element with the given parent and the given children.
Parameters:
  env - the environment
Parameters:
  parent - the parent element
Parameters:
  children - the children
Parameters:
  isStatic - is this a user structure element



StructureElement
public StructureElement(Environment env, StructureElement parent, StructureElement[] children)(Code)
Creates a new structure element with the given parent and the given children.
Parameters:
  env - the environment
Parameters:
  parent - the parent element
Parameters:
  children - the children



StructureElement
public StructureElement(Environment env)(Code)
Creates a new structure element with no parent and no children and the given environment.
Parameters:
  env - the environment



StructureElement
public StructureElement(Environment env, StructureElement[] children)(Code)
Creates a new structure element with no parent and given children.
Parameters:
  env - the environment
Parameters:
  children - the children



StructureElement
public StructureElement()(Code)
Creates a structure element with no environment and no parent and children. The environment should be defined with the method jacareto.system.EnvironmentMember.setEnvironment(Environment) before environment instances will be accessed.




Method Detail
addChild
public void addChild(StructureElement child)(Code)
Adds a child to the current children.
Parameters:
  child - the child to add



addChildren
public void addChildren(StructureElement[] children)(Code)
Adds an array of children.
Parameters:
  children - DOCUMENT ME!



addRecordablesToVector
protected void addRecordablesToVector(Vector v)(Code)
Adds all leave nodes belonging to the node's subtree to the given vector. If the actual instance is a recordable, it adds itself to the vector.
Parameters:
  v - DOCUMENT ME!



addStructureElementListener
public void addStructureElementListener(StructureElementListener listener)(Code)
Adds a structure element listener
Parameters:
  listener - the listener



calculateDuration
public void calculateDuration()(Code)
Calculates the duration of the structure element. If the structure element has children, the duration is the sum of the children's durations. Otherwise this it is 0 by default and should be overwritten in subclasses if necessary. This method also calls the calculateDuration method of its children.



children
public Enumeration children()(Code)
Returns the children of the receiver as enumeration the enumeration



childrenIterator
public Iterator childrenIterator()(Code)
Returns an iterator on the children of the structure element. Iterator



clearSearchResults
public void clearSearchResults()(Code)
Clears the search results.



clone
public Object clone()(Code)
Clones a structure element. Should be overwritten in subclasses DOCUMENT ME!



fireStructureElementEvent
protected void fireStructureElementEvent(StructureElementEvent event)(Code)
Fires a structure element event to all listeners.
Parameters:
  event - the event



fireValuesChanged
protected void fireValuesChanged()(Code)
Fires a structure element event to all listeners which indicates that one or more values have been changed.



getAllowsChildren
public boolean getAllowsChildren()(Code)
Returns true if the receiver allows children. whether or not the receiver allows children



getChild
public StructureElement getChild(int index)(Code)
Returns the child at the specified index.
Parameters:
  index - the index of the child the child at index index



getChildAt
public TreeNode getChildAt(int index)(Code)
Returns the child at index index
Parameters:
  index - the index of the child the child



getChildCount
public int getChildCount()(Code)
Returns the number of children. the number of childen



getChildren
public StructureElement[] getChildren()(Code)
Returns the children as array. DOCUMENT ME!



getChildren
public StructureElement[] getChildren(String className)(Code)
Returns all children of the structure element which are instances of the given class, in depth first search order.
Parameters:
  className - DOCUMENT ME! DOCUMENT ME!



getChildrenCount
public int getChildrenCount()(Code)
Returns the number of the children. DOCUMENT ME!



getClonedChildren
public StructureElement[] getClonedChildren()(Code)
Returns a vector of all cloned children. DOCUMENT ME!



getDuration
public long getDuration()(Code)
Returns the duration of the structure element the duration, in msec



getElementDescription
abstract public String getElementDescription()(Code)
Returns a description of the element. the description



getElementName
abstract public String getElementName()(Code)
Returns the name of the element. the name



getIndex
public int getIndex(TreeNode child)(Code)
Returns the index of a given child.
Parameters:
  child - the child we are interested in the index, or -1 if the child is not contained



getParent
public TreeNode getParent()(Code)
Returns the parent of a structure element. the parent, or null if there is no parent



getProcTime
public long getProcTime()(Code)
Returns the processing time of the structure element, if it has one, else 0 is returned. the processing time, in msecs



getRecordables
public Recordable[] getRecordables()(Code)
Returns all leaf nodes of the node's subtree. The order of the recordables is the order defined by the structure and NOT the original order in the Record; the recordables as array



getRecordablesInRecordOrder
public Recordable[] getRecordablesInRecordOrder(ReadAccessRecord record)(Code)
Returns all leaf nodes of the node's subtree. The order of the recordables is the original order in the given record.
Parameters:
  record - the record the recordables as array



getRecordablesInRecordOrder
public Recordable[] getRecordablesInRecordOrder()(Code)
Returns all leaf nodes of the node's subtree. The order of the recordables is the original order in the structure's record this structure element belongs to. the recordables as array



getRoot
public RootElement getRoot()(Code)
Returns the root of this element. If there is no element of type RootElement, then null will be returned. DOCUMENT ME!



getSearchString
protected String getSearchString()(Code)
Returns a string which is the basis for the search. The default method returns the result of StructureElement.toShortString() and can be overwritten in subclasses. the search string



getStructure
public Structure getStructure()(Code)
Returns the structure this element belongs to. the structure



getUUIDString
public String getUUIDString()(Code)
Returns the UUID String Returns the UUIDString.



hasChildren
public boolean hasChildren()(Code)
Returns whether or not this element has children. DOCUMENT ME!



hasProcTime
public boolean hasProcTime()(Code)
True, if this StructureElement has a processing time or is needed just for structuring purposes. boolean



insertChild
public void insertChild(StructureElement child, int index)(Code)
Inserts a child at a given index.
Parameters:
  child - the child to add
Parameters:
  index - the index



isLeaf
public boolean isLeaf()(Code)
Returns true if the receiver is a leaf whether or not the receiver is a leaf



isParentOfSearchHit
public boolean isParentOfSearchHit()(Code)
Returns whether or not the element is a parent element of a search hit. true if the element is a parent, otherwise false



isSearchHit
public boolean isSearchHit()(Code)
Returns whether or not the element is a search hit. true if the element is a search hit, otherwise false



isStatic
public boolean isStatic()(Code)
Returns true is this structure element is an user structure ? whether or not the element is static



parse
public static StructureElement parse(Environment env, RecordTokenizer recordTokenizer)(Code)
Parses a record which is tokenized by the given record tokenizer. This method always returns null at the moment; it must be overwritten in subclasses. When this method returns, the recordTokenizer must point at the position of the record which should be parsed next. So, if the method returns a StructureElement, the tokenizer must point at the first recordable after the last recordable contained in the structure element. If the method returns null, the tokenizer must point at the position it has pointed at when the method has been invoked.
Parameters:
  env - the environment
Parameters:
  recordTokenizer - the record tokenizer DOCUMENT ME!



removeAllChildren
public void removeAllChildren()(Code)
Removes all children. Does not remove the leaf nodes from the record; this must be done at another location.



removeChild
public void removeChild(StructureElement child)(Code)
Removes a child. Does not remove the leaf nodes from the record; this must be done at another location.
Parameters:
  child - the child to remove



removeChildrenCursorily
public void removeChildrenCursorily()(Code)
Removes the children which have been set with the method StructureElement.setChildrenCursorily(StructureElement[])



removeFromParent
public void removeFromParent()(Code)
Removes this node from its parent. Does not remove the leaf nodes from the record; this must be done at another location.



removeStructureElementListener
public void removeStructureElementListener(StructureElementListener listener)(Code)
Removes a structure element listener
Parameters:
  listener - the listener



search
public int search(RE re, String searchString)(Code)
Searches for a string (regular expression match or string comparison). If the regular expression matches or if the search string in contained, the element is marked as search hit. If a child element is a hit and not this instance, the structure element is marked as a parent element of a search hit. Either the regular expression is used or the searchstring. One of the two parameters should be null
Parameters:
  re - the regular expression
Parameters:
  searchString - the searchString the number of hits in this structure subtree



setChildren
public void setChildren(StructureElement[] children)(Code)
Sets the children. Also sets this instance as parent for all children, if the specified array is not null.
Parameters:
  children - StructureElement[]



setChildrenCursorily
public void setChildrenCursorily(StructureElement[] children)(Code)
Sets the children of the structure element without setting attribute values of the children. This method should just be used when structure elements are to be grouped together without building a "real" structure element.
Parameters:
  children - DOCUMENT ME!



setDuration
public void setDuration(long duration)(Code)
Sets the duration. Should be used in the StructureElement.calculateDuration method of subclasses. The duration has to be the proctime minimum
Parameters:
  duration - the new duration



setNotificationEnabled
public void setNotificationEnabled(boolean isNotificationEnabled)(Code)
Sets whether or not the element notifies listeners of changes.
Parameters:
  isNotificationEnabled - whether or not the notification is enabled



setParent
public void setParent(StructureElement parent)(Code)
Sets the parent for this structure element.
Parameters:
  parent - StructureElement



setProcTime
public void setProcTime(long processingTime)(Code)
Sets the processing time of the structure element. Takes the average processing time. If the average processing time is longer than the duration, the duration is set as proc time.
Parameters:
  processingTime - the new processing time in msecs



setStructure
public void setStructure(Structure structure)(Code)
Sets the structure this element belongs to.
Parameters:
  structure - the structure



setUUIDString
public void setUUIDString(String string)(Code)
Sets the UUID String for this StructureElement. Can only be set once!
Parameters:
  string - The UUIDString to set.



toShortString
abstract public String toShortString()(Code)
Returns a String which describes the content of the element shortly. a string with a short description of the element



vectorToArray
public static StructureElement[] vectorToArray(Vector v)(Code)
Converts a vector of structure elements to an array of structure elements
Parameters:
  v - Vector to convert the array containing all structure elements, or null if the vector isnot convertable.



Fields inherited from jacareto.system.EnvironmentMember
protected Customization customization(Code)(Java Doc)
protected Environment env(Code)(Java Doc)
protected Files files(Code)(Java Doc)
protected Language language(Code)(Java Doc)
protected Logger logger(Code)(Java Doc)

Methods inherited from jacareto.system.EnvironmentMember
public Customization getCustomization()(Code)(Java Doc)
public Environment getEnvironment()(Code)(Java Doc)
public Files getFiles()(Code)(Java Doc)
public Language getLanguage()(Code)(Java Doc)
public Logger getLogger()(Code)(Java Doc)
public void setEnvironment(Environment env)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.