FreeHEP API
Version current

hep.graphics.heprep
Interface HepRep

All Known Implementing Classes:
DefaultHepRep, HepRepAdapter, HepRepAdapter, HepRepAdapter, HepRepAdapter

public interface HepRep

Source Code:
HepRep.java

Method Summary
 void addInstanceTree(HepRepInstanceTree instanceTree)
          Adds an instancetree to this heprep.
 void addLayer(String layer)
          Add a layer to the list of layers in this heprep.
 void addTypeTree(HepRepTypeTree typeTree)
          Add a typetree to this heprep.
 String checkForException()
          Returns last exception thrown and clears it.
 HepRep copy()
          Returns a deep copy of the heprep, with all its attached trees, where instances are filtered using a HepRepSelectFilter.
 HepRep copy(HepRepSelectFilter filter)
          Returns a deep copy of the heprep, with all its attached trees, where instances are filtered using a HepRepSelectFilter.
 HepRepInstanceTree getInstances(String name, String version, String[] typeNames)
          Returns a named and versioned instancetree for a list of typenames.
 HepRepInstanceTree getInstancesAfterAction(String name, String version, String[] typeNames, HepRepAction[] actions, boolean getPoints, boolean getDrawAtts, boolean getNonDrawAtts, String[] invertAtts)
          Returns a named and versioned instancetree for a list of typenames after executing some action and for specific filters.
 List getInstanceTreeList()
          Returns a collection of instancetrees.
 Set getInstanceTrees()
          Returns a collection of instancetrees.
 HepRepInstanceTree getInstanceTreeTop(String name, String version)
          Returns a named and versioned instancetree.
 List getLayerOrder()
          Returns the list of layers.
 HepRepTypeTree getTypeTree(String name, String version)
          Returns a named and versioned typetree.
 List getTypeTreeList()
          Returns the collection of all typetrees of this heprep.
 Set getTypeTrees()
          Returns the collection of all typetrees of this heprep.
 void overlayInstanceTree(HepRepInstanceTree instanceTree)
          Overlays an instancetree to this heprep, overriding attributes and adding children.
 void removeInstanceTree(HepRepInstanceTree instanceTree)
          Remove an instanectree from this heprep.
 void removeTypeTree(HepRepTypeTree typeTree)
          Remove a typetree from this heprep.
 

Method Detail

addLayer

public void addLayer(String layer)
Add a layer to the list of layers in this heprep. The layer is added to the back of the list.

Parameters:
layer - name of layer to be added to the back of the list.

getLayerOrder

public List getLayerOrder()
Returns the list of layers.

Returns:
the known layer names, in the order back-to-front.

addTypeTree

public void addTypeTree(HepRepTypeTree typeTree)
Add a typetree to this heprep.

Parameters:
typeTree - to be added.

removeTypeTree

public void removeTypeTree(HepRepTypeTree typeTree)
Remove a typetree from this heprep.

Parameters:
typeTree - to be removed.

getTypeTrees

public Set getTypeTrees()
Returns the collection of all typetrees of this heprep.

Returns:
collection of HepRepTypeTrees.
Deprecated,:
use getTypeTreeList()

getTypeTreeList

public List getTypeTreeList()
Returns the collection of all typetrees of this heprep.

Returns:
collection of HepRepTypeTrees.

getTypeTree

public HepRepTypeTree getTypeTree(String name,
                                  String version)
Returns a named and versioned typetree.

Parameters:
name - name of the typetree.
version - version of the typetree.
Returns:
named and versioned HepRepTypeTree.

addInstanceTree

public void addInstanceTree(HepRepInstanceTree instanceTree)
Adds an instancetree to this heprep.


overlayInstanceTree

public void overlayInstanceTree(HepRepInstanceTree instanceTree)
Overlays an instancetree to this heprep, overriding attributes and adding children.

Parameters:
instanceTree - to be overlaid.

removeInstanceTree

public void removeInstanceTree(HepRepInstanceTree instanceTree)
Remove an instanectree from this heprep.

Parameters:
instanceTree - to be removed.

getInstanceTrees

public Set getInstanceTrees()
Returns a collection of instancetrees.

Returns:
collection of HepRepInstanceTrees.
Deprecated,:
use getInstaceTreeList()

getInstanceTreeList

public List getInstanceTreeList()
Returns a collection of instancetrees.

Returns:
collection of HepRepInstanceTrees.

getInstanceTreeTop

public HepRepInstanceTree getInstanceTreeTop(String name,
                                             String version)
Returns a named and versioned instancetree. FIXME: doc is incorrect here, should only return TOP of the tree. Filling in should be done by getInstances calls.

This tree needs to be added to the heprep afterwards.

Parameters:
name - name of the instancetree.
version - version of the instancetree.
Returns:
HepRepIntanceTree

getInstances

public HepRepInstanceTree getInstances(String name,
                                       String version,
                                       String[] typeNames)
Returns a named and versioned instancetree for a list of typenames.

This tree needs to be added to the heprep afterwards.

Parameters:
name - name of the instancetree.
version - version of the instancetree.
typeNames - a list of typenames for which we need instancetrees.
Returns:
HepRepIntanceTree

getInstancesAfterAction

public HepRepInstanceTree getInstancesAfterAction(String name,
                                                  String version,
                                                  String[] typeNames,
                                                  HepRepAction[] actions,
                                                  boolean getPoints,
                                                  boolean getDrawAtts,
                                                  boolean getNonDrawAtts,
                                                  String[] invertAtts)
Returns a named and versioned instancetree for a list of typenames after executing some action and for specific filters. This tree needs to be added to the heprep afterwards.

The inversion effect of invertAtts depends on the values of GetDrawAtts and GetNonDrawAtts as follows:

Parameters:
name - name of the instancetree.
version - version of the instancetree.
typeNames - a list of typenames for which we need instancetrees.
actions - execute this list of actions before returning.
getPoints - include the HepRepPoints in the instance tree.
getDrawAtts - include the Draw attributes in the instance tree.
getNonDrawAtts - include the Non-Draw attributes in the instance tree.
invertAtts - list of attributes to be included or not depending on getDrawAtts and getNonDrawAtts.
Returns:
HepRepIntanceTree

checkForException

public String checkForException()
Returns last exception thrown and clears it. Useful for implementations without exception handling.

Returns:
last exception and clears it.

copy

public HepRep copy()
            throws CloneNotSupportedException
Returns a deep copy of the heprep, with all its attached trees, where instances are filtered using a HepRepSelectFilter.

Returns:
copy of heprep.
Throws:
CloneNotSupportedException - in case copy is not possible

copy

public HepRep copy(HepRepSelectFilter filter)
            throws CloneNotSupportedException
Returns a deep copy of the heprep, with all its attached trees, where instances are filtered using a HepRepSelectFilter.

Parameters:
filter - to be used for filtering instances.
Returns:
copy of heprep.
Throws:
CloneNotSupportedException - in case copy is not possible

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.