FreeHEP API
Version current

hep.graphics.heprep1.adapter
Class AbstractHepRepTypeAdapter

java.lang.Object
  extended byhep.graphics.heprep.ref.DefaultHepRepAttribute
      extended byhep.graphics.heprep.ref.DefaultHepRepDefinition
          extended byhep.graphics.heprep1.adapter.HepRepAttributeAdapter
              extended byhep.graphics.heprep1.adapter.HepRepDefinitionAdapter
                  extended byhep.graphics.heprep1.adapter.AbstractHepRepTypeAdapter
All Implemented Interfaces:
HepRepAttribute, HepRepConstants, HepRepDefinition, HepRepType, Serializable
Direct Known Subclasses:
HepRepTypeAdapter, HepRepTypeFromHepRepAdapter

public abstract class AbstractHepRepTypeAdapter
extends HepRepDefinitionAdapter
implements HepRepType

Version:
$Id: AbstractHepRepTypeAdapter.java,v 1.2 2004/09/03 18:18:41 duns Exp $
Author:
Mark Donszelmann
See Also:
Serialized Form
Source Code:
AbstractHepRepTypeAdapter.java

Field Summary
protected  HepRepType parent
           
protected  ListSet types
           
 
Fields inherited from class hep.graphics.heprep.ref.DefaultHepRepDefinition
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
AbstractHepRepTypeAdapter(HepRepAttribute attribute1, HepRepType parent)
           
 
Method Summary
 void addType(HepRepType type)
          Adds a sub-type to this type.
 HepRepType copy(HepRepType parent)
          Returns a deep copy of this type.
 HepRepAttDef getAttDef(String name)
          searched for a definition with given name.
 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.
 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.
 
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, toString, wait, wait, wait
 
Methods inherited from interface hep.graphics.heprep.HepRepType
getName
 
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

parent

protected HepRepType parent

types

protected ListSet types
Constructor Detail

AbstractHepRepTypeAdapter

public AbstractHepRepTypeAdapter(HepRepAttribute attribute1,
                                 HepRepType parent)
Method Detail

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.

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 -

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.

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.

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 HepRepDefinitionAdapter

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

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.

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.