FreeHEP API
Version v1.2

hep.graphics.heprep
Class HepRepFactory

java.lang.Object
  |
  +--hep.graphics.heprep.HepRepFactory
Direct Known Subclasses:
DefaultHepRepFactory, XMLHepRepStreamerFactory

public abstract class HepRepFactory
extends Object

HepRepFactory interface.

Author:
Mark Donszelmann

Field Summary
static String defaultFactoryName
          Default HepRep factory classname.
static String factoryName
          Name of the interface for factory for HepRep.
static String propertyFile
          Properties filename to find out what factory to load for HepRep.
 
Constructor Summary
HepRepFactory()
           
 
Method Summary
static HepRepFactory create()
          Creates a heprep factory based on the content of heprep.properties file.
abstract  HepRep createHepRep()
          Creates a HepRep.
abstract  HepRepAction createHepRepAction(String name, String expression)
          Creates a HepRepAction.
abstract  HepRepInstance createHepRepInstance(HepRepInstance parent, HepRepType type)
          Creates a HepRepInstance.
abstract  HepRepInstance createHepRepInstance(HepRepInstanceTree parent, HepRepType type)
          Creates a HepRepInstance.
abstract  HepRepInstanceTree createHepRepInstanceTree(String name, String version, HepRepTreeID typeTree)
          Creates a HepRepInstanceTree.
abstract  HepRepPoint createHepRepPoint(HepRepInstance instance, double x, double y, double z)
          Creates a HepRepPoint.
 HepRepTreeID createHepRepTreeID(String name, String version)
          Creates a HepRepTreeID.
abstract  HepRepTreeID createHepRepTreeID(String name, String version, String qualifier)
          Creates a HepRepTreeID.
abstract  HepRepType createHepRepType(HepRepType parent, String name)
          Creates a HepRepType.
abstract  HepRepTypeTree createHepRepTypeTree(HepRepTreeID treeID)
          Creates a HepRepTypeTree.
abstract  HepRepWriter createHepRepWriter(OutputStream out)
          Creates a HepRepWriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factoryName

public static final String factoryName
Name of the interface for factory for HepRep.

See Also:
Constant Field Values

propertyFile

public static final String propertyFile
Properties filename to find out what factory to load for HepRep.

See Also:
Constant Field Values

defaultFactoryName

public static final String defaultFactoryName
Default HepRep factory classname.

See Also:
Constant Field Values
Constructor Detail

HepRepFactory

public HepRepFactory()
Method Detail

create

public static HepRepFactory create()
                            throws ClassNotFoundException,
                                   IllegalAccessException,
                                   InstantiationException
Creates a heprep factory based on the content of heprep.properties file. If not found the default HepRepFactory is created.

Returns:
HepRepFactory.
ClassNotFoundException
IllegalAccessException
InstantiationException

createHepRepWriter

public abstract HepRepWriter createHepRepWriter(OutputStream out)
                                         throws IOException
Creates a HepRepWriter.

Parameters:
out - output stream.
Throws:
IOException - in case of problems with the stream.

createHepRepPoint

public abstract HepRepPoint createHepRepPoint(HepRepInstance instance,
                                              double x,
                                              double y,
                                              double z)
                                       throws IOException
Creates a HepRepPoint.

Parameters:
instance - to add the point to.
x - x coordinate of point.
y - y coordinate of point.
z - z coordinate of point.
Throws:
IOException - only if written immediately to a stream.

createHepRepInstance

public abstract HepRepInstance createHepRepInstance(HepRepInstance parent,
                                                    HepRepType type)
                                             throws IOException
Creates a HepRepInstance.

Throws:
IOException - only if written immediately to a stream.
Parent:
to add the instance to.
Type:
type the associated type.

createHepRepInstance

public abstract HepRepInstance createHepRepInstance(HepRepInstanceTree parent,
                                                    HepRepType type)
                                             throws IOException
Creates a HepRepInstance.

Throws:
IOException - only if written immediately to a stream.
Parent:
to add the instance to.
Type:
type the associated type.

createHepRepTreeID

public HepRepTreeID createHepRepTreeID(String name,
                                       String version)
                                throws IOException
Creates a HepRepTreeID.

Parameters:
name - of the treeID.
version - of the treeID.
Throws:
IOException - only if written immediately to a stream.

createHepRepTreeID

public abstract HepRepTreeID createHepRepTreeID(String name,
                                                String version,
                                                String qualifier)
                                         throws IOException
Creates a HepRepTreeID.

Parameters:
name - of the treeID.
version - of the treeID.
qualifier - of the treeID.
Throws:
IOException - only if written immediately to a stream.

createHepRepAction

public abstract HepRepAction createHepRepAction(String name,
                                                String expression)
                                         throws IOException
Creates a HepRepAction.

Parameters:
name - of the action.
expression - of the action.
Throws:
IOException - only if written immediately to a stream.

createHepRepInstanceTree

public abstract HepRepInstanceTree createHepRepInstanceTree(String name,
                                                            String version,
                                                            HepRepTreeID typeTree)
                                                     throws IOException
Creates a HepRepInstanceTree.

The tree needs to be added to the HepRep.

Parameters:
name - of the instancetree.
version - of the instancetree.
typeTree - associated typetree.
Throws:
IOException - only if written immediately to a stream.

createHepRepType

public abstract HepRepType createHepRepType(HepRepType parent,
                                            String name)
                                     throws IOException
Creates a HepRepType.

Parameters:
parent - to add this type to.
name - of the type to create.
Throws:
IOException - only if written immediately to a stream.

createHepRepTypeTree

public abstract HepRepTypeTree createHepRepTypeTree(HepRepTreeID treeID)
                                             throws IOException
Creates a HepRepTypeTree.

The tree needs to be added to the HepRep.

Parameters:
treeID - to name the tree being created.
Throws:
IOException - only if written immediately to a stream.

createHepRep

public abstract HepRep createHepRep()
                             throws IOException
Creates a HepRep.

Throws:
IOException - only if written immediately to a stream.

FreeHEP API
Version v1.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.