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.storage.database
Class IdleConnectionNarrowFrameStore

    java.lang.Object
      edu.stanford.smi.protege.storage.database.IdleConnectionNarrowFrameStore

All Implemented Interfaces:
  NarrowFrameStore

    public class IdleConnectionNarrowFrameStore

extends Object
implements NarrowFrameStore

Constructor Summary
`IdleConnectionNarrowFrameStore(ValueCachingNarrowFrameStore delegate)`

Method Summary
`void` | `addValues(Frame frame, Slot slot, Facet facet, boolean isTemplate, Collection values)`
`boolean` | `beginTransaction(String name)`
`void` | `close()`
`boolean` | `commitTransaction()`
`void` | `deleteFrame(Frame frame)`
`void` | `executeQuery(Query query, QueryCallback callback)` The executeQuery method allows for complex queries.
`Set` | `getClosure(Frame frame, Slot slot, Facet facet, boolean isTemplate)`
`int` | `getClsCount()`
`NarrowFrameStore` | `getDelegate()`
`int` | `getFacetCount()`
`Frame` | `getFrame(FrameID id)`
`int` | `getFrameCount()`
`Set<Frame>` | `getFrames()`
`Set<Frame>` | `getFrames(Slot slot, Facet facet, boolean isTemplate, Object value)`
`Set<Frame>` | `getFramesWithAnyValue(Slot slot, Facet facet, boolean isTemplate)`
`Set<Frame>` | `getMatchingFrames(Slot slot, Facet facet, boolean isTemplate, String value, int maxMatches)`
`Set<Reference>` | `getMatchingReferences(String value, int maxMatches)`
`String` | `getName()` The Narrow Frame store has a standard set/get name interface.
`Set<Reference>` | `getReferences(Object value)`
`int` | `getSimpleInstanceCount()`
`int` | `getSlotCount()`
`TransactionMonitor` | `getTransactionStatusMonitor()` Retrieves a transaction status monitor for transactions.
`List` | `getValues(Frame frame, Slot slot, Facet facet, boolean isTemplate)` Obtains the values of a slot/facet to a frame.
`int` | `getValuesCount(Frame frame, Slot slot, Facet facet, boolean isTemplate)`
`void` | `moveValue(Frame frame, Slot slot, Facet facet, boolean isTemplate, int from, int to)` Retrieves the list of values associated with the (frame, slot, facet, isTemplate) combination and moves the item at the position from to the position to.
`void` | `reinitialize()`
`void` | `removeValue(Frame frame, Slot slot, Facet facet, boolean isTemplate, Object value)`
`void` | `replaceFrame(Frame frame)` A complete hack to work around problems with the java packages feature
`void` | `replaceFrame(Frame original, Frame replacement)` Replace all references of the frame original with the frame replacement.
`boolean` | `rollbackTransaction()`
`boolean` | `setCaching(RemoteSession session, boolean doCache)`
`void` | `setName(String name)` The Narrow Frame store has a standard set/get name interface.
`void` | `setValues(Frame frame, Slot slot, Facet facet, boolean isTemplate, Collection values)`

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

Constructor Detail

### IdleConnectionNarrowFrameStore

    public IdleConnectionNarrowFrameStore(ValueCachingNarrowFrameStore delegate)

Method Detail

### addValues

    public void addValues(Frame frame,
                          Slot slot,
                          Facet facet,
                          boolean isTemplate,
                          Collection values)

  Specified by:
    `addValues` in interface `NarrowFrameStore`

### beginTransaction

    public boolean beginTransaction(String name)

  Specified by:
    `beginTransaction` in interface `NarrowFrameStore`

### close

    public void close()

  Specified by:
    `close` in interface `NarrowFrameStore`

### commitTransaction

    public boolean commitTransaction()

  Specified by:
    `commitTransaction` in interface `NarrowFrameStore`

### deleteFrame

    public void deleteFrame(Frame frame)

  Specified by:
    `deleteFrame` in interface `NarrowFrameStore`

### executeQuery

    public void executeQuery(Query query,
                             QueryCallback callback)

  Description copied from interface: `NarrowFrameStore`
  The executeQuery method allows for complex queries. It is asynchronous so that in server-client mode the server knowledge base lock will not be held for an excessive amount of time. The contract specifies that the implementor must call one of the QueryCallback methods in a separate thread. This makes it possible for the caller to know how to retrieve the results in a synchronous way without worrying about deadlock.

  Specified by:
    `executeQuery` in interface `NarrowFrameStore`

### getClosure

    public Set getClosure(Frame frame,
                          Slot slot,
                          Facet facet,
                          boolean isTemplate)

  Specified by:
    `getClosure` in interface `NarrowFrameStore`

### getClsCount

    public int getClsCount()

  Specified by:
    `getClsCount` in interface `NarrowFrameStore`

### getDelegate

    public NarrowFrameStore getDelegate()

  Specified by:
    `getDelegate` in interface `NarrowFrameStore`

### getFacetCount

    public int getFacetCount()

  Specified by:
    `getFacetCount` in interface `NarrowFrameStore`

### getFrame

    public Frame getFrame(FrameID id)

  Specified by:
    `getFrame` in interface `NarrowFrameStore`

### getFrameCount

    public int getFrameCount()

  Specified by:
    `getFrameCount` in interface `NarrowFrameStore`

### getFrames

    public Set<Frame> getFrames()

  Specified by:
    `getFrames` in interface `NarrowFrameStore`

### getFrames

    public Set<Frame> getFrames(Slot slot,
                                Facet facet,
                                boolean isTemplate,
                                Object value)

  Specified by:
    `getFrames` in interface `NarrowFrameStore`

### getFramesWithAnyValue

    public Set<Frame> getFramesWithAnyValue(Slot slot,
                                            Facet facet,
                                            boolean isTemplate)

  Specified by:
    `getFramesWithAnyValue` in interface `NarrowFrameStore`

### getMatchingFrames

    public Set<Frame> getMatchingFrames(Slot slot,
                                        Facet facet,
                                        boolean isTemplate,
                                        String value,
                                        int maxMatches)

  Specified by:
    `getMatchingFrames` in interface `NarrowFrameStore`
  Parameters:
    `slot` - the slot
    `facet` - the facet
    `isTemplate` - whether we are looking at template values
    `value` - the regexp to use for matching
    `maxMatches` - the max number of matches (-1 for get all)
  Returns:
  See Also:
    `KnowledgeBase.getMatchingFrames`

### getMatchingReferences

    public Set<Reference> getMatchingReferences(String value,
                                                int maxMatches)

  Specified by:
    `getMatchingReferences` in interface `NarrowFrameStore`

### getName

    public String getName()

  Description copied from interface: `NarrowFrameStore`
  The Narrow Frame store has a standard set/get name interface. One of the purposes of this interface is to allow the MergingNarrowFrameStore match names of the narrow frame stores of including and included projects. For this purpose the name of the narrow frame store is the string representation of the uri for the project.

  Specified by:
    `getName` in interface `NarrowFrameStore`
  Returns:
    the name of this narrow frame store.

### getReferences

    public Set<Reference> getReferences(Object value)

  Specified by:
    `getReferences` in interface `NarrowFrameStore`

### getSimpleInstanceCount

    public int getSimpleInstanceCount()

  Specified by:
    `getSimpleInstanceCount` in interface `NarrowFrameStore`

### getSlotCount

    public int getSlotCount()

  Specified by:
    `getSlotCount` in interface `NarrowFrameStore`

### getTransactionStatusMonitor

    public TransactionMonitor getTransactionStatusMonitor()

  Description copied from interface: `NarrowFrameStore`
  Retrieves a transaction status monitor for transactions. If this call returns null then it means that transactions are not supported.

  Specified by:
    `getTransactionStatusMonitor` in interface `NarrowFrameStore`
  Returns:
    A TransactionMonitor object that tracks the status of transactions.

### getValues

    public List getValues(Frame frame,
                          Slot slot,
                          Facet facet,
                          boolean isTemplate)

  Description copied from interface: `NarrowFrameStore`
  Obtains the values of a slot/facet to a frame. It consists of a list of Strings, Integers Floats and Frames. This call does one of several things. If facet == null then we are looking at a slot value. In this case, if isTemplate is true, then the frame is a class, the slot is a template slot and the value is a default facet value. If facet != null then we are looking at a facet value. In this case, if isTemplate is true then the frame is a class, the slot is a template slot and the value is a default facet value.

  Specified by:
    `getValues` in interface `NarrowFrameStore`
  Parameters:
    `frame` - - the frame
    `slot` - the slot
    `facet` - the facet. If this is non-null then we are looking at a facet value.
    `isTemplate` - to be determined
  Returns:
    a list of the values of the slot of the frame.

### getValuesCount

    public int getValuesCount(Frame frame,
                              Slot slot,
                              Facet facet,
                              boolean isTemplate)

  Specified by:
    `getValuesCount` in interface `NarrowFrameStore`

### moveValue

    public void moveValue(Frame frame,
                          Slot slot,
                          Facet facet,
                          boolean isTemplate,
                          int from,
                          int to)

  Description copied from interface: `NarrowFrameStore`
  Retrieves the list of values associated with the (frame, slot, facet, isTemplate) combination and moves the item at the position from to the position to. Indexing is done starting from 0.

  Specified by:
    `moveValue` in interface `NarrowFrameStore`
  Parameters:
    `frame` - the frame (as used in getValues)
    `slot` - the slot (as used in getValues)
    `facet` - the facet (as used in getValues)
    `isTemplate` - whether it is a template (as used in getValues)
    `from` - the starting position of a value
    `to` - the position of the value after this call

### reinitialize

    public void reinitialize()

  Specified by:
    `reinitialize` in interface `NarrowFrameStore`

### setCaching

    public boolean setCaching(RemoteSession session,
                              boolean doCache)

  Specified by:
    `setCaching` in interface `NarrowFrameStore`

### removeValue

    public void removeValue(Frame frame,
                            Slot slot,
                            Facet facet,
                            boolean isTemplate,
                            Object value)

  Specified by:
    `removeValue` in interface `NarrowFrameStore`

### replaceFrame

    public void replaceFrame(Frame frame)

  Description copied from interface: `NarrowFrameStore`
  A complete hack to work around problems with the java packages feature

  Specified by:
    `replaceFrame` in interface `NarrowFrameStore`

### replaceFrame

    public void replaceFrame(Frame original,
                             Frame replacement)

  Description copied from interface: `NarrowFrameStore`
  Replace all references of the frame original with the frame replacement. This (somewhat expensive) routine is used when the user wants to change the name of a frame. The result of this call is that the original frame is deleted and the replacement frame takes over in each position where the original frame occured. When the name of a frame is being changed, the caller will create a new frame (the replacement) with the new name and will then delete the original frame.

  Specified by:
    `replaceFrame` in interface `NarrowFrameStore`
  Parameters:
    `original` - the frame in the database being replaced
    `replacement` - the replacement frame that does not exist in the database before the call.

### rollbackTransaction

    public boolean rollbackTransaction()

  Specified by:
    `rollbackTransaction` in interface `NarrowFrameStore`

### setName

    public void setName(String name)

  Description copied from interface: `NarrowFrameStore`
  The Narrow Frame store has a standard set/get name interface. One of the purposes of this interface is to allow the MergingNarrowFrameStore match names of the narrow frame stores of including and included projects. For this purpose the name of the narrow frame store is the string representation of the uri for the project.

  Specified by:
    `setName` in interface `NarrowFrameStore`
  Parameters:
    `name` - - the name of the Narrow Frame Store.

### setValues

    public void setValues(Frame frame,
                          Slot slot,
                          Facet facet,
                          boolean isTemplate,
                          Collection values)

  Specified by:
    `setValues` in interface `NarrowFrameStore`

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.