FreeHEP API
Version v1.2.2

hep.graphics.heprep.ref
Class DefaultHepRepType

java.lang.Object
  |
  +--hep.graphics.heprep.ref.DefaultHepRepAttribute
        |
        +--hep.graphics.heprep.ref.DefaultHepRepDefinition
              |
              +--hep.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.30 2003/12/09 21:07:38 duns Exp $
Author:
M.Donszelmann
See Also:
Serialized Form

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
DefaultHepRepType(HepRepType parent, String name)
           
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)
           
 boolean equals(Object o)
           
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.
 Set getTypes()
          Returns a collection of all the sub-types of this type.
 int hashCode()
           
 void setDescription(String description)
           
 void setInfoURL(String infoURL)
           
 String toString()
           
 
Methods inherited from class hep.graphics.heprep.ref.DefaultHepRepDefinition
addAttDef, addAttDef, 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, 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

public DefaultHepRepType(String name)

DefaultHepRepType

public DefaultHepRepType(HepRepType 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
Parameters:
name - of attribute definition.
Returns:
attribute definition.

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
Parameters:
name - of attribute value.
Returns:
attribute value.

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)

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)

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.

equals

public boolean equals(Object o)
Overrides:
equals in class DefaultHepRepDefinition

hashCode

public int hashCode()
Overrides:
hashCode in class DefaultHepRepDefinition

toString

public String toString()
Overrides:
toString in class Object
Returns:
a string representation of this HepRepType

display

public void display(String indent)

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.