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.uka.ipd.consensus.foundation.schema
Interface Attribute

All Superinterfaces:
  Commentatable, Comparable, Concept, Createable, Rateable, Serializable, Versionable

All Known Implementing Classes:
  AttributeImpl

public interface Attribute
extends Concept, Serializable, Comparable

This interface represents an attribute (name/value pair) of a topic.

Version:
  2006-06-14
Author:
  Thomas Much
See Also:
  `Topic`, `Attributeable`, `OntologyManager.createAttribute(User, String, String, String, Topic)`

Method Summary
`Attributeable` | `getAttributeable()` Returns the element which this attribute belongs to.
`Topic` | `getType()` Returns the type of the attribute.
`String` | `getValue()` Returns the attribute's value.
`void` | `setType(User setter, Topic type)` Sets the type of the attribute.
`void` | `setValue(User setter, String value)` Changes the attribute's value.

Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Concept
`getId, getName, isOfType, setName`

Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Versionable
`getVersion`

Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Commentatable
`getComment, setComment`

Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Rateable
`addRating, getAverageRatingValue, getRating, getRatings, getRatingsCount`

Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Createable
`getCreator`

Methods inherited from interface java.lang.Comparable
`compareTo`

Method Detail

### getValue

    public String getValue()

  Returns the attribute's value.

  Returns:
    the attribute's value (may be an empty string, but never `null`)

### setValue

    public void setValue(User setter,
                         String value)
                  throws OntologyManagerException,
                         DynamicRightsManagerException

  Changes the attribute's value.

  Parameters:
    `setter` - the user who wants to change the value
    `value` - the new value (`null` is treated as an empty string)
  Throws:
    `OntologyManagerException` - if the value could not be changed
    `DynamicRightsManagerException` - if the user is not allowed to change the value
  See Also:
    `DynamicRightsManager.mayChangeAttributeValue(User, Attribute)`

### getType

    public Topic getType()

  Returns the type of the attribute.

  Returns:
    the attribute's type or `null` if the attribute does not have a type

### setType

    public void setType(User setter,
                        Topic type)
                 throws OntologyManagerException,
                        DynamicRightsManagerException

  Sets the type of the attribute. If the implementation supports classes, the type must be a class topic.

  Parameters:
    `setter` - the user who wants to set the type
    `type` - the type topic (or `null` to remove the type)
  Throws:
    `OntologyManagerException` - if the type could not be set
    `DynamicRightsManagerException` - if the user is not allowed to change the type
  See Also:
    `Topic.isClassTopic()`

### getAttributeable

    public Attributeable getAttributeable()

  Returns the element which this attribute belongs to. With the current schema definition, this can only be a Topic object.

  Returns:
    the topic which this attribute belongs to
  See Also:
    `Topic`

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