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

## edu.stanford.smi.protege.widget
Class DefaultWidgetMapper

    java.lang.Object
      edu.stanford.smi.protege.widget.DefaultWidgetMapper

All Implemented Interfaces:
  WidgetMapper

    public class DefaultWidgetMapper

extends Object
implements WidgetMapper

Determines the mapping between a slot and its default widget. Widgets declare themselves in their manifest file to be the "default" widget for a particular slot cardinality and type. If multiple widgets declare for the same combination the last one wins. This is by design and allows a plugin author to override the standard system widgets. Plugin authors can also declare their widget to be the default one for a particular Instance/allowed-class combination. This allows a widget to be the default for, for example, the date class.

Author:
  Ray Fergerson

Constructor Summary
`DefaultWidgetMapper(KnowledgeBase kb)`

Method Summary
`WidgetDescriptor` | `createWidgetDescriptor(Cls cls, Slot slot, Facet facet)`
`String` | `getDefaultWidgetClassName(Cls cls, Slot slot, Facet facet)`
`Collection` | `getSuitableWidgetClassNames(Cls cls, Slot slot, Facet facet)`
`boolean` | `isSuitable(Cls cls, Slot slot, Facet facet, String className)`
`boolean` | `isSuitableWidget(Cls cls, Slot slot, Facet facet, WidgetDescriptor d)`
`String` | `toString()`

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

Constructor Detail

### DefaultWidgetMapper

    public DefaultWidgetMapper(KnowledgeBase kb)

Method Detail

### createWidgetDescriptor

    public WidgetDescriptor createWidgetDescriptor(Cls cls,
                                                   Slot slot,
                                                   Facet facet)

  Specified by:
    `createWidgetDescriptor` in interface `WidgetMapper`

### getDefaultWidgetClassName

    public String getDefaultWidgetClassName(Cls cls,
                                            Slot slot,
                                            Facet facet)

  Specified by:
    `getDefaultWidgetClassName` in interface `WidgetMapper`

### getSuitableWidgetClassNames

    public Collection getSuitableWidgetClassNames(Cls cls,
                                                  Slot slot,
                                                  Facet facet)

  Specified by:
    `getSuitableWidgetClassNames` in interface `WidgetMapper`

### isSuitable

    public boolean isSuitable(Cls cls,
                              Slot slot,
                              Facet facet,
                              String className)

### isSuitableWidget

    public boolean isSuitableWidget(Cls cls,
                                    Slot slot,
                                    Facet facet,
                                    WidgetDescriptor d)

  Specified by:
    `isSuitableWidget` in interface `WidgetMapper`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2012 Stanford University.