Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs
Class AnnotatedEntity

    java.lang.Object
      de.jstacs.AnnotatedEntity

All Implemented Interfaces:
  Storable

Direct Known Subclasses:
  Parameter, Result

    public abstract class AnnotatedEntity

extends Object
implements Storable

Superclass for all Jstacs entities that have a name, a comment, and a data type as annotations. Specifically, such entities are `Result`s for storing results of some computation together with an annotation on their meaning, and `Parameter`s, which allow for annotating external parameters, especially parameters of constructors.

Author:
  Jan Grau, Jens Keilwagen

Field Summary
`protected String` | `comment` The comment for the entity.
`protected DataType` | `datatype` The data type of the entity.
`protected String` | `name` The name of the entity.

Constructor Summary
`protected` | `AnnotatedEntity(StringBuffer rep)` The standard constructor for the interface `Storable`.
`protected` | `AnnotatedEntity(String name, String comment, DataType datatype)` The main constructor which takes the main information of a `AnnotatedEntity`.

Method Summary
`protected abstract void` | `appendFurtherInfos(StringBuffer buf)` This method can be used in the method `Storable.toXML()` to extract further information (name, comment, datatype).
`protected abstract void` | `extractFurtherInfos(StringBuffer buf)` This method can be used in the constructor with parameter `StringBuffer` to extract the further information.
`String` | `getComment()` Returns the comment on the `AnnotatedEntity`.
`DataType` | `getDatatype()` Returns the data type of the `AnnotatedEntity`.
`String` | `getName()` Returns the name of the `AnnotatedEntity`.
`abstract Object` | `getValue()` Returns the value of the `AnnotatedEntity`.
`abstract String` | `getXMLTag()` This method returns a tag used as outer tag of the XML description.
`StringBuffer` | `toXML()` This method returns an XML representation as `StringBuffer` of an instance of the implementing class.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### name

    protected String name

  The name of the entity.

### comment

    protected String comment

  The comment for the entity.

### datatype

    protected DataType datatype

  The data type of the entity.

Constructor Detail

### AnnotatedEntity

    protected AnnotatedEntity(String name,
                              String comment,
                              DataType datatype)

  The main constructor which takes the main information of a `AnnotatedEntity`.

  Parameters:
    `name` - the name of the result
    `comment` - the comment for the result
    `datatype` - the data type of the result

### AnnotatedEntity

    protected AnnotatedEntity(StringBuffer rep)
                       throws NonParsableException

  The standard constructor for the interface `Storable`. Creates a new `AnnotatedEntity` out of its XML representation.

  Parameters:
    `rep` - the XML representation as `StringBuffer`
  Throws:
    `NonParsableException` - if the XML representation is not parsable
  See Also:
    `Storable`, `extractFurtherInfos(StringBuffer)`

Method Detail

### getXMLTag

    public abstract String getXMLTag()

  This method returns a tag used as outer tag of the XML description.

  Returns:
    a tag used as outer tag of the XML description

### toXML

    public final StringBuffer toXML()

  Description copied from interface: `Storable`
  This method returns an XML representation as `StringBuffer` of an instance of the implementing class.

  Specified by:
    `toXML` in interface `Storable`
  Returns:
    the XML representation

### appendFurtherInfos

    protected abstract void appendFurtherInfos(StringBuffer buf)

  This method can be used in the method `Storable.toXML()` to extract further information (name, comment, datatype).

  Parameters:
    `buf` - a XML representation of the main information as `StringBuffer`
  See Also:
    `Storable.toXML()`

### extractFurtherInfos

    protected abstract void extractFurtherInfos(StringBuffer buf)
                                         throws NonParsableException

  This method can be used in the constructor with parameter `StringBuffer` to extract the further information.

  Parameters:
    `buf` - a XML represenation of the main information as `StringBuffer`
  Throws:
    `NonParsableException` - if the XML representation is not parsable
  See Also:
    `AnnotatedEntity(StringBuffer)`

### getDatatype

    public final DataType getDatatype()

  Returns the data type of the `AnnotatedEntity`.

  Returns:
    the data type of the `AnnotatedEntity`

### getValue

    public abstract Object getValue()

  Returns the value of the `AnnotatedEntity`.

  Returns:
    the value of the `AnnotatedEntity`

### getName

    public final String getName()

  Returns the name of the `AnnotatedEntity`.

  Returns:
    the name of the `AnnotatedEntity`

### getComment

    public final String getComment()

  Returns the comment on the `AnnotatedEntity`.

  Returns:
    the comment on the `AnnotatedEntity`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD