1 / 38

The Awesome Power of Slot Widgets Unleashed

Warning. This Talk Contains Actual Code. The Protege Bootstrap. Protege is built around the idea of

burton
Download Presentation

The Awesome Power of Slot Widgets Unleashed

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. 1 The Awesome Power of (Slot) Widgets Unleashed William Grosso Stanford Medical Informatics Stanford University

    2. Warning

    3. The Protege Bootstrap Protege is built around the idea of “Doing KA to do KA” Traditionally, this involves three steps First, acquire an ontology of conceptual definitions Then, acquire user-interface information (“Forms layout information”) And then, acquire instances of the concepts

    4. The Idea of a Form Central to this is an analogy: Class is to Instance as Blank Form is to Filled-Out Form

    8. What is a Widget A widget is a piece of code that faithfully translates and renders a small portion of the knowledge base Idea: if you take a small enough piece of the knowledge-base, the user doesn’t need to think about the logical details A “Form” is nothing more than a set of widgets, laid out as a single conceptual entity

    10. Why Do This ? Separate out structure of knowledge (meta-knowledge) from actual knowledge Use the meta-knowledge to improve knowledge acquisition Make it easier to acquire information Make it harder to make mistakes Use the meta-knowledge to improve knowledge-base maintenance Make it easier to know what’s in the KB

    11. What do you do with a Widget In the forms layout panel, users choose the widgets that will be in the form Widgets must know when they are suitable for a particular class and slot In the instance panel, users use widgets to view, and edit, instances Widgets need to display values, allow the user to edit values, and communicate the results back to Protege

    12. Widgets are Software Components The set of available widgets can be extended at any time You can write a widget and add it to your existing installation of Protege The Project contains the widget information Which widgets are available Which forms have what widgets Any customizations that have been done

    13. The Widget is Not in Control ! Protege is a Container Framework It places and removes widgets on the screen It is responsible for persistence and for updating the knowledge base It is responsible for keeping the knowledge-base consistent Widgets should only respond to user interface events Local events, in a limited fashion

    14. Widget Tasks Suitability Checking Configuration Rendering Values Editing Values

    15. Widget Lifecycle Initial Construction Initialization One of either Configuration (and saving configuration information) SetValues loop Framework calls setValues, widget renders and allows editing of values

    16. The Structure of a Widget

    17. SliderWidget: A Worked Example Idea: Textfields are a simple, intuitive, and precise way to enter numbers Great for floating point numbers Not so good for “An integer between 1 and 100” Want a graphical way to represent small ranges of integers

    18. SuitabilityChecking Done in a static method on the java class

    19. What’s Configurable on a Slider? Not Much (this is an example) ! Whether or not to display ticks How often to display them

    20. We Store this in SliderProperties

    21. Slider Properties handles Persistence

    22. ClsListener ?

    23. How Configuration Works The framework creates and initializes the widget As part of this, it gives the widget a property list The framework calls the widget’s createWidgetConfigurationPanel() method It gets a Component The user interacts with the component The framework stores the property list

    24. SliderWidget’s Configuration

    25. Configuration involves Components

    26. The Widget Must Handle Events

    27. How KA Works As with Configuration, the Widget will be initialized with a Class, a Slot, and a PropertyList Over time, however, the widget will be repeatedly placed on screen Each time, it will have setInstance and setValues called Specifying the instance being viewed and the values of of the slot

    28. SliderWidget’s Initialize

    29. Most of the Time Most Widgets inherit from AbstractWidget AbstractWidget is a convenience class provided by Protege Widgets that do so need to implement the initialize() methods in order to be configured properly

    30. Editing the Knowledge-Base Initialize() is entirely a user-interface setup method There are 4 methods involved in editing the knowledge base setInstance, setValues. Called by the Framework at the start of editing getValues. Called by the framework to get the new values when editing is done valueChanged. A convenience method in AbstractWidget

    31. SliderWidget’s implementations

    32. Editing happens in response to user actions Changes happen as per the standard Java GUI model _slider sends out a change event SliderWidget gets the event, and calls valueChanged()

    33. Key Points Framework handles most details Storage, placement, configuration Widget is, more or less, a special-purpose event handler No guarantees about lifetime or a continuous existence Should never initiate action or perform extensive computations

    34. A Subtle Point A widget implements the isSuitable method SliderWidget checked Slot had integer value type Slot was single-valued That minimum and maximum facet values were set Many many other things can be checked Complex widgets frequently come with their own ontologies (and ontological assumptions)

    35. Widget Scale This talk has been about slot widgets Widgets used to view, edit, and acquire values at a single slot SliderWidget is emphatically a small-scale (local) widget Widgets can display large sections of the knowledge base

    36. Non-Local Slot Widgets Still slot widgets But much larger scale-- They make more assumptions They pull in larger amounts of data from the KB ContainsWidget navigates the KB and pulls in lots of data Needs to know when lots of things have changed (SliderWidget simply needs to know when a local value has changed)

    37. Tabs Something new under the sun-- large scale widgetry Key Motivation: Aid in navigation and in viewing large-scale structure of kb Slot widget: a knowledge base is a logical theory which needs to be faithfully represented Tab widget: a knowledge base is an incredibly detailed web site, which needs to be navigated

    38. HPKB Tab New types of kb validation now possible: completeness (whereas slotwidgets are really only about correctness) HPKBTab is very much domain specific. But there’s a fruitful domain here

More Related