com.cosylab.vdct.vdb
Class VDBTemplate

java.lang.Object
  extended by com.cosylab.vdct.vdb.VDBTemplate
All Implemented Interfaces:
Descriptable, Inspectable, Commentable, MonitoredPropertyListener

public class VDBTemplate
extends java.lang.Object
implements Inspectable, Commentable, Descriptable, MonitoredPropertyListener

Data object representing EPICS DB template. All data is obtained from DB file. Group contains template structure.

Author:
Matej

Field Summary
protected  java.lang.String description
           
protected  java.lang.String fileName
           
protected  Group group
           
protected  java.lang.String id
           
protected  java.lang.String ioc
           
protected  java.util.Hashtable macros
           
protected  java.util.Vector macrosV
           
protected  long modificationTime
           
protected  java.util.Hashtable ports
           
protected  java.util.Vector portsV
           
protected static java.util.Random random
           
protected  java.lang.String version
           
 
Constructor Summary
VDBTemplate(java.lang.String id, java.lang.String fileName)
          Constructor for VDBTemplate.
 
Method Summary
 VDBMacro addMacro()
           
 VDBMacro addMacro(java.lang.String name)
           
 void addMacro(VDBMacro vdbMacro)
           
 VDBPort addPort()
           
 VDBPort addPort(java.lang.String name)
           
 void addPort(VDBPort vdbPort)
           
 void addProperty()
           
 java.lang.String getComment()
          Returns the comment.
 InspectableProperty getCommentProperty()
           
 java.lang.String getDescription()
          Returns the description.
 java.lang.Object getDsId()
           
 java.lang.String getFileName()
          Returns the fileName.
 Group getGroup()
          Returns the group.
 javax.swing.Icon getIcon()
          Insert the method's description here.
 java.lang.String getId()
          Returns the id.
 java.lang.String getIoc()
           
 java.util.Hashtable getMacros()
          Returns the macros.
 long getMacrosGeneratedID()
          Returns the macrosGeneratedID.
static GUISeparator getMacrosSeparator()
          Insert the method's description here.
 java.util.Vector getMacrosV()
          Returns the macrosV.
 java.util.ArrayList getModeNames()
          Obtains list of all mode names for this particular property.
 long getModificationTime()
           
 java.lang.String getName()
          Insert the method's description here.
 java.util.Hashtable getPorts()
          Returns the ports.
 long getPortsGeneratedID()
          Returns the portsGeneratedID.
static GUISeparator getPortsSeparator()
          Insert the method's description here.
 java.util.Vector getPortsV()
          Returns the portsV.
 InspectableProperty[] getProperties(int mode, boolean spreadsheet)
           
 java.lang.String getRealDescription()
          Returns the description.
static GUISeparator getTemplateSeparator()
          Insert the method's description here.
 java.lang.String getVersion()
           
 void propertyChanged(InspectableProperty property)
           
 void removeMacro(java.lang.String name)
           
 void removeMacro(VDBMacro macro)
           
 void removePort(java.lang.String name)
           
 void removePort(VDBPort port)
           
 void removeProperty(InspectableProperty property)
           
 void renameMacro(VDBMacro macro, java.lang.String newName)
           
 void renameMacroProperty(InspectableProperty property)
           
 void renamePort(VDBPort port, java.lang.String newName)
           
 void renamePortProperty(InspectableProperty property)
           
 void renameProperty(InspectableProperty property)
           
 void setComment(java.lang.String comment)
          Sets the comment.
 void setDescription(java.lang.String description)
          Sets the description.
 void setFileName(java.lang.String fileName)
          Sets the fileName.
 void setGroup(Group group)
          Sets the group.
 void setId(java.lang.Object dsId, java.lang.String id)
          Sets the id.
 void setIoc(java.lang.String ioc)
           
 void setMacros(java.util.Hashtable macros)
          Sets the macros.
 void setMacrosV(java.util.Vector macrosV)
          Sets the macrosV.
 void setModificationTime(long modificationTime)
           
 void setPorts(java.util.Hashtable ports)
          Sets the ports.
 void setPortsV(java.util.Vector portsV)
          Sets the portsV.
 void setVersion(java.lang.String version)
           
 java.lang.String toString()
          Insert the method's description here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected java.lang.String id

fileName

protected java.lang.String fileName

description

protected java.lang.String description

modificationTime

protected long modificationTime

version

protected java.lang.String version

ioc

protected java.lang.String ioc

ports

protected java.util.Hashtable ports

portsV

protected java.util.Vector portsV

macros

protected java.util.Hashtable macros

macrosV

protected java.util.Vector macrosV

group

protected Group group

random

protected static java.util.Random random
Constructor Detail

VDBTemplate

public VDBTemplate(java.lang.String id,
                   java.lang.String fileName)
Constructor for VDBTemplate.

Method Detail

getDescription

public java.lang.String getDescription()
Returns the description.

Specified by:
getDescription in interface Descriptable
Returns:
String

getRealDescription

public java.lang.String getRealDescription()
Returns the description.

Returns:
String

getGroup

public Group getGroup()
Returns the group.

Returns:
Group

setDescription

public void setDescription(java.lang.String description)
Sets the description.

Specified by:
setDescription in interface Descriptable
Parameters:
description - The description to set

setGroup

public void setGroup(Group group)
Sets the group.

Parameters:
group - The group to set

getFileName

public java.lang.String getFileName()
Returns the fileName.

Returns:
String

getId

public java.lang.String getId()
Returns the id.

Returns:
String

getModificationTime

public long getModificationTime()
Returns:
the modificationTime

setModificationTime

public void setModificationTime(long modificationTime)
Parameters:
modificationTime - the modificationTime to set

getCommentProperty

public InspectableProperty getCommentProperty()
Specified by:
getCommentProperty in interface Inspectable
Returns:
com.cosylab.vdct.inspector.InspectableProperty
See Also:
Inspectable.getCommentProperty()

getIcon

public javax.swing.Icon getIcon()
Description copied from interface: Inspectable
Insert the method's description here. Creation date: (10.1.2001 15:14:56)

Specified by:
getIcon in interface Inspectable
Returns:
javax.swing.Icon
See Also:
Inspectable.getIcon()

getModeNames

public java.util.ArrayList getModeNames()
Description copied from interface: Inspectable
Obtains list of all mode names for this particular property. Modes are numbered from 0-n. Creation date: (11.1.2001 21:30:04)

Specified by:
getModeNames in interface Inspectable
Returns:
java.util.ArrayList array of mode names - obtained using toString().
See Also:
Inspectable.getModeNames()

getName

public java.lang.String getName()
Description copied from interface: Inspectable
Insert the method's description here. Creation date: (10.1.2001 14:47:43)

Specified by:
getName in interface Inspectable
Specified by:
getName in interface Commentable
Returns:
java.lang.String
See Also:
Inspectable.getName()

getTemplateSeparator

public static GUISeparator getTemplateSeparator()
Insert the method's description here. Creation date: (3.2.2001 13:07:04)

Returns:
com.cosylab.vdct.vdb.GUISeparator

getProperties

public InspectableProperty[] getProperties(int mode,
                                           boolean spreadsheet)
Specified by:
getProperties in interface Inspectable
Returns:
com.cosylab.vdct.inspector.InspectableProperty[]
See Also:
Inspectable.getProperties(int, boolean spreadsheet)

toString

public java.lang.String toString()
Insert the method's description here. Creation date: (10.1.2001 14:49:50)

Specified by:
toString in interface Inspectable
Overrides:
toString in class java.lang.Object
Returns:
java.lang.String

getComment

public java.lang.String getComment()
Returns the comment.

Specified by:
getComment in interface Commentable
Returns:
String

setComment

public void setComment(java.lang.String comment)
Sets the comment.

Specified by:
setComment in interface Commentable
Parameters:
comment - The comment to set

getPorts

public java.util.Hashtable getPorts()
Returns the ports.

Returns:
Hashtable

getPortsV

public java.util.Vector getPortsV()
Returns the portsV.

Returns:
Vector

getMacros

public java.util.Hashtable getMacros()
Returns the macros.

Returns:
Hashtable

getMacrosV

public java.util.Vector getMacrosV()
Returns the macrosV.

Returns:
Vector

setPorts

public void setPorts(java.util.Hashtable ports)
Sets the ports.

Parameters:
ports - The ports to set

setPortsV

public void setPortsV(java.util.Vector portsV)
Sets the portsV.

Parameters:
portsV - The portsV to set

setMacros

public void setMacros(java.util.Hashtable macros)
Sets the macros.

Parameters:
macros - The macros to set

setMacrosV

public void setMacrosV(java.util.Vector macrosV)
Sets the macrosV.

Parameters:
macrosV - The macrosV to set

getPortsSeparator

public static GUISeparator getPortsSeparator()
Insert the method's description here. Creation date: (3.2.2001 13:07:04)

Returns:
com.cosylab.vdct.vdb.GUISeparator

getMacrosSeparator

public static GUISeparator getMacrosSeparator()
Insert the method's description here. Creation date: (3.2.2001 13:07:04)

Returns:
com.cosylab.vdct.vdb.GUISeparator

addPort

public VDBPort addPort(java.lang.String name)

addMacro

public VDBMacro addMacro(java.lang.String name)

addPort

public void addPort(VDBPort vdbPort)

addMacro

public void addMacro(VDBMacro vdbMacro)

removePort

public void removePort(java.lang.String name)

removeMacro

public void removeMacro(java.lang.String name)

removePort

public void removePort(VDBPort port)

removeMacro

public void removeMacro(VDBMacro macro)

renamePort

public void renamePort(VDBPort port,
                       java.lang.String newName)

renameMacro

public void renameMacro(VDBMacro macro,
                        java.lang.String newName)

addProperty

public void addProperty()
Specified by:
addProperty in interface MonitoredPropertyListener
See Also:
MonitoredPropertyListener.addProperty()

addPort

public VDBPort addPort()

addMacro

public VDBMacro addMacro()

propertyChanged

public void propertyChanged(InspectableProperty property)
Specified by:
propertyChanged in interface MonitoredPropertyListener
See Also:
MonitoredPropertyListener.propertyChanged(InspectableProperty)

removeProperty

public void removeProperty(InspectableProperty property)
Specified by:
removeProperty in interface MonitoredPropertyListener
See Also:
MonitoredPropertyListener.removeProperty(InspectableProperty)

renameProperty

public void renameProperty(InspectableProperty property)
Specified by:
renameProperty in interface MonitoredPropertyListener
See Also:
MonitoredPropertyListener.renameProperty(InspectableProperty)

renamePortProperty

public void renamePortProperty(InspectableProperty property)
See Also:
MonitoredPropertyListener.renameProperty(InspectableProperty)

renameMacroProperty

public void renameMacroProperty(InspectableProperty property)
See Also:
MonitoredPropertyListener.renameProperty(InspectableProperty)

setFileName

public void setFileName(java.lang.String fileName)
Sets the fileName.

Parameters:
fileName - The fileName to set

setId

public void setId(java.lang.Object dsId,
                  java.lang.String id)
Sets the id.

Parameters:
id - The id to set

getPortsGeneratedID

public long getPortsGeneratedID()
Returns the portsGeneratedID.

Returns:
long

getMacrosGeneratedID

public long getMacrosGeneratedID()
Returns the macrosGeneratedID.

Returns:
long

getVersion

public java.lang.String getVersion()

setVersion

public void setVersion(java.lang.String version)

getIoc

public java.lang.String getIoc()

setIoc

public void setIoc(java.lang.String ioc)

getDsId

public java.lang.Object getDsId()
Specified by:
getDsId in interface Inspectable
Specified by:
getDsId in interface Commentable