Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.4 rc1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.smi.protegex.owl.ui.editors
Interface PropertyValueEditor

All Known Subinterfaces:
  AnnotationsWidgetPlugin

All Known Implementing Classes:
  DateAnnotationsWidgetPlugin, DateTimeAnnotationsWidgetPlugin, DateTimeValueEditor, DateValueEditor, StringValueEditor, TimeAnnotationsWidgetPlugin, TimeValueEditor

    public interface PropertyValueEditor

An object that can be used to customize the appearance and behavior of (datatype) values in visual editors.

Author:
  Holger Knublauch

Method Summary
`boolean` | `canEdit(RDFResource subject, RDFProperty predicate, Object value)` Checks whether this is able to edit values for a certain predicate.
`Object` | `createDefaultValue(RDFResource subject, RDFProperty predicate)` Creates a default value for a given predicate at a given subject.
`Object` | `editValue(Component parent, RDFResource subject, RDFProperty predicate, Object value)` Edits a given value for a given resource/predicate pair.
`boolean` | `mustEdit(RDFResource subject, RDFProperty predicate, Object value)` Checks whether this is the only way to edit values for a certain predicate.

Method Detail

### canEdit

    boolean canEdit(RDFResource subject,
                    RDFProperty predicate,
                    Object value)

  Checks whether this is able to edit values for a certain predicate.

  Parameters:
    `subject` -
    `predicate` -
    `value` -
  Returns:
    true if this can edit such values

### createDefaultValue

    Object createDefaultValue(RDFResource subject,
                              RDFProperty predicate)

  Creates a default value for a given predicate at a given subject. The hosting widget should call this method on each of its registered editors to see whether any of them defines a non-null default value.

  Parameters:
    `subject` - the RDFResource to create a default value for
    `predicate` - the annotation predicate
  Returns:
    the default value or null if this does not define a default for this predicate

### editValue

    Object editValue(Component parent,
                     RDFResource subject,
                     RDFProperty predicate,
                     Object value)

  Edits a given value for a given resource/predicate pair. For example, after the user has double-clicked on the value, the host widget could iterate on all editors to see whether any of them is ready to edit this value (returning true).

  Parameters:
    `parent` -
    `subject` -
    `predicate` -
    `value` -
  Returns:
    the new value (!= null) if this has handled editing for the value

### mustEdit

    boolean mustEdit(RDFResource subject,
                     RDFProperty predicate,
                     Object value)

  Checks whether this is the only way to edit values for a certain predicate. This is used to force editing of value types like xsd:date, where simple string input fields would not be sufficient.

  Parameters:
    `subject` -
    `predicate` -
    `value` -
  Returns:
    true if this can edit such values

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.4 rc1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug report or feature request
Copyright (c) 1998-2009 Stanford University.