FreeHEP API
Version current

hep.graphics.heprep.ref
Class DefaultHepRepType

java.lang.Object
  extended byhep.graphics.heprep.ref.DefaultHepRepAttribute
      extended byhep.graphics.heprep.ref.DefaultHepRepDefinition
          extended byhep.graphics.heprep.ref.DefaultHepRepType
All Implemented Interfaces:
HepRepAttribute, HepRepConstants, HepRepDefinition, HepRepType, Serializable

public class DefaultHepRepType
extends DefaultHepRepDefinition
implements HepRepType, Serializable

Version:
$Id: DefaultHepRepType.java,v 1.34 2004/09/03 18:18:39 duns Exp $
Author:
M.Donszelmann
See Also:
Serialized Form
Source Code:
DefaultHepRepType.java

Field Summary
static String cvsId
           
 
Fields inherited from interface hep.graphics.heprep.HepRepConstants
SHOW_DESC, SHOW_EXTRA, SHOW_NAME, SHOW_NONE, SHOW_VALUE, TYPE_BOOLEAN, TYPE_COLOR, TYPE_DOUBLE, TYPE_INT, TYPE_LONG, TYPE_STRING, TYPE_UNKNOWN
 
Constructor Summary
protected DefaultHepRepType(HepRepType parent, String name)
           
protected DefaultHepRepType(HepRepTypeTree parent, String name)
           
protected DefaultHepRepType(String name)
           
 
Method Summary
 void addType(HepRepType type)
          Adds a sub-type to this type.
 HepRepType copy(HepRepType parent)
          Returns a deep copy of this type.
 void display(String indent)
           
static HepRepAttDef getAttDef(HepRepType type, String lowerCaseName)
           
 HepRepAttDef getAttDef(String name)
          searched for a definition with given name.
static HepRepAttValue getAttValue(HepRepType type, String lowerCaseName)
           
 HepRepAttValue getAttValue(String name)
          searched for a value with given name.
 String getDescription()
          Returns the description of this type.
 String getFullName()
          Returns the full name of this type.
 String getInfoURL()
          Returns the information URL of this type.
 String getName()
          Returns the name of this type.
 HepRepType getSuperType()
          Returns the parent of this type.
 List getTypeList()
          Returns a collection of all the sub-types of this type.
 Set getTypes()
          Returns a collection of all the sub-types of this type.
 void setDescription(String description)
          Sets the description of this type.
 void setInfoURL(String infoURL)
          Sets the information URL of this type.
 String toString()
           
 
Methods inherited from class hep.graphics.heprep.ref.DefaultHepRepDefinition
addAttDef, addAttDef, equals, getAttDefFromNode, getAttDefsFromNode
 
Methods inherited from class hep.graphics.heprep.ref.DefaultHepRepAttribute
addAttColor, addAttColor, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, getAttValueFromNode, getAttValuesFromNode, removeAttValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface hep.graphics.heprep.HepRepDefinition
addAttDef, addAttDef, getAttDefFromNode, getAttDefsFromNode
 
Methods inherited from interface hep.graphics.heprep.HepRepAttribute
addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, getAttValueFromNode, getAttValuesFromNode, removeAttValue
 

Field Detail

cvsId

public static final String cvsId
See Also:
Constant Field Values
Constructor Detail

DefaultHepRepType

protected DefaultHepRepType(String name)

DefaultHepRepType

protected DefaultHepRepType(HepRepType parent,
                            String name)

DefaultHepRepType

protected DefaultHepRepType(HepRepTypeTree parent,
                            String name)
Method Detail

getSuperType

public HepRepType getSuperType()
Description copied from interface: HepRepType
Returns the parent of this type.

Specified by:
getSuperType in interface HepRepType
Returns:
parent of type, or null if top-level.

getAttDef

public HepRepAttDef getAttDef(String name)
searched for a definition with given name. Search up the type tree if needed.

Specified by:
getAttDef in interface HepRepDefinition
Specified by:
getAttDef in class DefaultHepRepDefinition

getAttDef

public static HepRepAttDef getAttDef(HepRepType type,
                                     String lowerCaseName)

getAttValue

public HepRepAttValue getAttValue(String name)
searched for a value with given name. Search up the type tree if needed.

Specified by:
getAttValue in interface HepRepAttribute
Specified by:
getAttValue in class DefaultHepRepAttribute

getAttValue

public static HepRepAttValue getAttValue(HepRepType type,
                                         String lowerCaseName)

copy

public HepRepType copy(HepRepType parent)
                throws CloneNotSupportedException
Description copied from interface: HepRepType
Returns a deep copy of this type.

Specified by:
copy in interface HepRepType
Parameters:
parent - to which this copy is added.
Returns:
copy of this type.
Throws:
CloneNotSupportedException - if copying is not possible.

getName

public String getName()
Description copied from interface: HepRepType
Returns the name of this type. This is the full name if one uses flat-types, and the node name if one uses hierarchical typenames. It is the name supplied at construction of the type.

Specified by:
getName in interface HepRepType
Returns:
name of type.
See Also:
HepRepType.getFullName()

getFullName

public String getFullName()
Description copied from interface: HepRepType
Returns the full name of this type. The full name is constructed from the root of the typeTree (without the typeTreeName) by concatenating all the node names separated by slashes "/". For example: Geometry/InnerDetector/Sector24/Wire20

Specified by:
getFullName in interface HepRepType
Returns:
full name of type.
See Also:
HepRepType.getName()

getDescription

public String getDescription()
Description copied from interface: HepRepType
Returns the description of this type.

Specified by:
getDescription in interface HepRepType
Returns:
description of type.

setDescription

public void setDescription(String description)
Description copied from interface: HepRepType
Sets the description of this type.

Specified by:
setDescription in interface HepRepType

getInfoURL

public String getInfoURL()
Description copied from interface: HepRepType
Returns the information URL of this type.

Specified by:
getInfoURL in interface HepRepType
Returns:
info URL of type.

setInfoURL

public void setInfoURL(String infoURL)
Description copied from interface: HepRepType
Sets the information URL of this type.

Specified by:
setInfoURL in interface HepRepType
Parameters:
infoURL -

addType

public void addType(HepRepType type)
Description copied from interface: HepRepType
Adds a sub-type to this type.

Specified by:
addType in interface HepRepType
Parameters:
type - sub-type to be added.

getTypes

public Set getTypes()
Description copied from interface: HepRepType
Returns a collection of all the sub-types of this type.

Specified by:
getTypes in interface HepRepType
Returns:
collection of HepRepTypes.

getTypeList

public List getTypeList()
Description copied from interface: HepRepType
Returns a collection of all the sub-types of this type.

Specified by:
getTypeList in interface HepRepType
Returns:
collection of HepRepTypes.

toString

public String toString()
Returns:
a string representation of this HepRepType

display

public void display(String indent)

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.