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

## edu.stanford.smi.protege.model
Class ModelUtilities

    java.lang.Object
      edu.stanford.smi.protege.model.ModelUtilities

    public class ModelUtilities

extends Object

Convenience utilities for dealing with the Knowledge Base. Most of these methods take frame names (strings) rather than frames and convert them. Note that there is a serious performance penalty for using these methods if they are used repeatedly to perform some operation. For repeat operations you should look up the needed frames once and then store them and use the stored values. Nevertheless, for some rare or one-off operations these methods can be useful and convenient.

Author:
  Ray Fergerson

Constructor Summary
`ModelUtilities()`

Method Summary
`static void` | `addOwnSlotValue(Frame frame, String slotName, Object value)`
`static Map` | `createValueMap(KnowledgeBase sourceKB, KnowledgeBase targetKB)`
`static Object` | `getDirectOwnSlotValue(Frame frame, String name)`
`static List` | `getDirectOwnSlotValues(Frame frame, String name)`
`static Object` | `getOwnSlotValue(Frame frame, String name)`
`static Collection` | `getOwnSlotValues(Frame frame, String name)`
`List` | `getPath(Cls cls, List list)`
`static List` | `getPathToRoot(Cls cls)`
`static Object` | `getTemplateFacetValue(Cls cls, Slot slot, String facetName)`
`static Collection` | `getTemplateFacetValues(Cls cls, Slot slot, String facetName)`
`static boolean` | `isVisibleInGUI(Frame frame)`
`static void` | `removeOwnSlotValue(Frame frame, String slotName, Object value)`
`static void` | `setOwnSlotValue(Frame frame, String slotName, Object value)`
`static void` | `setOwnSlotValues(Frame frame, String slotName, Collection values)`
`static void` | `setTemplateFacetValue(Cls cls, Slot slot, String facetName, Object value)`
`static void` | `setTemplateFacetValues(Cls cls, Slot slot, String facetName, Collection values)`

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

Constructor Detail

### ModelUtilities

    public ModelUtilities()

Method Detail

### addOwnSlotValue

    public static void addOwnSlotValue(Frame frame,
                                       String slotName,
                                       Object value)

### createValueMap

    public static Map createValueMap(KnowledgeBase sourceKB,
                                     KnowledgeBase targetKB)

### getOwnSlotValue

    public static Object getOwnSlotValue(Frame frame,
                                         String name)

### getDirectOwnSlotValue

    public static Object getDirectOwnSlotValue(Frame frame,
                                               String name)

### getOwnSlotValues

    public static Collection getOwnSlotValues(Frame frame,
                                              String name)

### getDirectOwnSlotValues

    public static List getDirectOwnSlotValues(Frame frame,
                                              String name)

### getPath

    public List getPath(Cls cls,
                        List list)

### getPathToRoot

    public static List getPathToRoot(Cls cls)

### getTemplateFacetValue

    public static Object getTemplateFacetValue(Cls cls,
                                               Slot slot,
                                               String facetName)

### getTemplateFacetValues

    public static Collection getTemplateFacetValues(Cls cls,
                                                    Slot slot,
                                                    String facetName)

### isVisibleInGUI

    public static boolean isVisibleInGUI(Frame frame)

### removeOwnSlotValue

    public static void removeOwnSlotValue(Frame frame,
                                          String slotName,
                                          Object value)

### setOwnSlotValue

    public static void setOwnSlotValue(Frame frame,
                                       String slotName,
                                       Object value)

### setOwnSlotValues

    public static void setOwnSlotValues(Frame frame,
                                        String slotName,
                                        Collection values)

### setTemplateFacetValue

    public static void setTemplateFacetValue(Cls cls,
                                             Slot slot,
                                             String facetName,
                                             Object value)

### setTemplateFacetValues

    public static void setTemplateFacetValues(Cls cls,
                                              Slot slot,
                                              String facetName,
                                              Collection values)

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.4 rc2
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-2009 Stanford University.