hep.graphics.heprep
Class HepRepFactory

java.lang.Object
  extended by hep.graphics.heprep.HepRepFactory

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.
abstract  HepRepReader createHepRepReader(InputStream in)
          Creates a HepRepReader from a stream.
abstract  HepRepReader createHepRepReader(String inputFileName)
          Creates a HepRepReader from a file name.
 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  HepRepType createHepRepType(HepRepTypeTree parent, String name)
          Creates a HepRepType.
abstract  HepRepTypeTree createHepRepTypeTree(HepRepTreeID treeID)
          Creates a HepRepTypeTree.
abstract  HepRepWriter createHepRepWriter(OutputStream out, boolean randomAccess, boolean compress)
          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.
Throws:
ClassNotFoundException - if the factory class cannot be found
IllegalAccessException - if the factory class cannot be accessed
InstantiationException - if the factory class cannot be instantiated

createHepRepReader

public abstract HepRepReader createHepRepReader(InputStream in)
                                         throws IOException
Creates a HepRepReader from a stream.

Parameters:
in - input stream.
Returns:
HepRepReader
Throws:
IOException - in case of an IO problem

createHepRepReader

public abstract HepRepReader createHepRepReader(String inputFileName)
                                         throws IOException
Creates a HepRepReader from a file name.

Parameters:
inputFileName - file name.
Returns:
HepRepReader
Throws:
IOException - in case of an IO problem

createHepRepWriter

public abstract HepRepWriter createHepRepWriter(OutputStream out,
                                                boolean randomAccess,
                                                boolean compress)
                                         throws IOException
Creates a HepRepWriter.

Parameters:
out - output stream.
randomAccess - create a writer in a format that will allow random access (may be ignored).
compress - create a writer that uses compression (may be ignored).
Returns:
HepRepWriter
Throws:
IOException - in case of an IO problem

createHepRepPoint

public abstract HepRepPoint createHepRepPoint(HepRepInstance instance,
                                              double x,
                                              double y,
                                              double z)
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.
Returns:
HepRepPoint

createHepRepInstance

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

Parameters:
parent - to add the instance to.
type - type the associated type.
Returns:
HepRepInstance

createHepRepInstance

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

Parameters:
parent - to add the instance to.
type - type the associated type.
Returns:
HepRepInstance

createHepRepTreeID

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

Parameters:
name - of the treeID.
version - of the treeID.
Returns:
HepRepTreeID

createHepRepTreeID

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

Parameters:
name - of the treeID.
version - of the treeID.
qualifier - of the treeID.
Returns:
HepRepTreeID

createHepRepAction

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

Parameters:
name - of the action.
expression - of the action.
Returns:
HepRepAction

createHepRepInstanceTree

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

The tree needs to be added to the HepRep.

Parameters:
name - of the instancetree.
version - of the instancetree.
typeTree - associated typetree.
Returns:
HepRepInstanceTree

createHepRepType

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

Parameters:
parent - to add this type to.
name - of the type to create.
Returns:
HepRepType

createHepRepType

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

Parameters:
parent - to add this type to.
name - of the type to create.
Returns:
HepRepType

createHepRepTypeTree

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

The tree needs to be added to the HepRep.

Parameters:
treeID - to name the tree being created.
Returns:
HepRepTypeTree

createHepRep

public abstract HepRep createHepRep()
Creates a HepRep.

Returns:
HepRep


Copyright © 2000-2007 FreeHEP. All Rights Reserved.