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 Attributeable

All Superinterfaces:
  Serializable

All Known Subinterfaces:
  Topic

All Known Implementing Classes:
  TopicImpl

public interface Attributeable
extends Serializable

This is a mixin interface for attributeable elements of the ontology. With the current schema definition, only topics are attributeable.

Version:
  2006-06-14
Author:
  Thomas Much
See Also:
  `Topic`

Method Summary
`void` | `addAttribute(User setter, Attribute attr)` Adds an attribute object to the attributeable element.
`Attribute` | `getAttribute(User getter, String id)` Returns the attribute of a given id.
`Collection` | `getAttributes(User getter)` Returns a collection of all Attribute objects of this element that the user may see.
`Collection` | `getAttributes(User getter, Topic type)` Returns a collection of all Attribute objects of the given type.
`void` | `removeAttribute(User remover, Attribute attr)` Removes the given attribute, if the object is an attribute of this element (otherwise, the call is ignored).

Method Detail

### addAttribute

    public void addAttribute(User setter,
                             Attribute attr)
                      throws OntologyManagerException,
                             DynamicRightsManagerException

  Adds an attribute object to the attributeable element.

  Parameters:
    `setter` - the user who wants to add the attribute
    `attr` - the Attribute object
  Throws:
    `OntologyManagerException` - if the attribute could not be added
    `DynamicRightsManagerException` - if the user is not allowed to add the attribute
  See Also:
    `OntologyManager.createAttribute(User, String, String, String, Topic)`, `DynamicRightsManager.mayAddAttribute(User, Attribute, Attributeable)`

### removeAttribute

    public void removeAttribute(User remover,
                                Attribute attr)
                         throws OntologyManagerException,
                                DynamicRightsManagerException

  Removes the given attribute, if the object is an attribute of this element (otherwise, the call is ignored).

  Parameters:
    `remover` - the user who wants to remove the attribute
    `attr` - the Attribute object to be removed
  Throws:
    `OntologyManagerException` - if the attribute could not be removed
    `DynamicRightsManagerException` - if the user is not allowed to remove the attribute
  See Also:
    `DynamicRightsManager.mayRemoveAttribute(User, Attribute)`

### getAttributes

    public Collection getAttributes(User getter)

  Returns a collection of all Attribute objects of this element that the user may see.

  Parameters:
    `getter` - the user who wants to see the attributes
  Returns:
    a possibly empty collection, never `null`
  See Also:
    `Attribute`, `DynamicRightsManager.mayViewAttribute(User, Attribute)`, `DynamicRightsManager.mayViewTopic(User, Topic)`

### getAttributes

    public Collection getAttributes(User getter,
                                    Topic type)

  Returns a collection of all Attribute objects of the given type.

  Parameters:
    `getter` - the user who wants to see the attributes
    `type` - type the type topic of the attributes, including `null` for the typeless attributes
  Returns:
    a possibly empty collection, never `null`
  See Also:
    `Attribute`, `DynamicRightsManager.mayViewAttribute(User, Attribute)`

### getAttribute

    public Attribute getAttribute(User getter,
                                  String id)

  Returns the attribute of a given id.

  Parameters:
    `getter` - the user who wants to get the attribute
    `id` - the id in question
  Returns:
    the attribute with the id or `null` if this element does not have an attribute with the id
  See Also:
    `Concept.getId()`, `DynamicRightsManager.mayViewAttribute(User, Attribute)`

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