Protege 2.1

edu.stanford.smi.protege.model
Interface Storage

All Superinterfaces:
Disposable
All Known Implementing Classes:
DatabaseStorage, FrameDBStorage

public interface Storage
extends Disposable

Low-level holder of frames.

Author:
Ray Fergerson

Method Summary
 void addFrame(Frame frame)
           
 void addValue(Frame frame, Slot slot, Facet facet, boolean isTemplate, Object value)
           
 void addValue(Frame frame, Slot slot, Facet facet, boolean isTemplate, Object value, int index)
           
 boolean beginTransaction()
           
 boolean containsFrame(Frame frame)
           
 boolean containsFrame(String name)
           
 boolean endTransaction(boolean doCommit)
           
 int getClsCount()
           
 int getFacetCount()
           
 Frame getFrame(FrameID id)
           
 Frame getFrame(String name)
           
 int getFrameCount()
           
 Collection getFrames()
           
 Collection getFramesWithValue(Slot slot, Facet facet, boolean isTemplate, Object o)
           
 Collection getMatchingFrames(Slot slot, Facet facet, boolean isTemplate, String s, int maxMatches)
           
 Collection getReferences(Object o, int maxReferences)
           
 int getSlotCount()
           
 Object getValue(Frame frame, Slot slot, Facet facet, boolean isTemplate)
           
 int getValueCount(Frame frame, Slot slot, Facet facet, boolean isTemplate)
           
 ArrayList getValues(Frame frame, Slot slot, Facet facet, boolean isTemplate)
           
 boolean hasValue(Frame frame, Slot slot, Facet facet, boolean isTemplate, Object value)
           
 boolean hasValueAtSomeFrame(Slot slot, Facet facet, boolean isTemplate)
           
 void moveValue(Frame frame, Slot slot, Facet facet, boolean isTemplate, int from, int to)
           
 void remove(Frame frame, Slot slot, Facet facet, boolean isTemplate)
           
 void removeFrame(Frame frame)
           
 void removeSingleValue(Frame frame, Slot slot, Facet facet, boolean isTemplate, Object value)
          remove a single occurance of value from the slot/facet value
 void removeValues(Slot slot, Facet facet, boolean isTemplate, Cls cls)
           
 void replace(Frame from, Frame to)
           
 void setValue(Frame frame, Slot slot, Facet facet, boolean isTemplate, Object value)
           
 void setValues(Frame frame, Slot slot, Facet facet, boolean isTemplate, Collection values)
           
 boolean supportsTransactions()
           
 
Methods inherited from interface edu.stanford.smi.protege.util.Disposable
dispose
 

Method Detail

addFrame

public void addFrame(Frame frame)

addValue

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

addValue

public void addValue(Frame frame,
                     Slot slot,
                     Facet facet,
                     boolean isTemplate,
                     Object value,
                     int index)

beginTransaction

public boolean beginTransaction()

containsFrame

public boolean containsFrame(Frame frame)

containsFrame

public boolean containsFrame(String name)

endTransaction

public boolean endTransaction(boolean doCommit)

getFrame

public Frame getFrame(FrameID id)

getFrame

public Frame getFrame(String name)

getFrameCount

public int getFrameCount()

getFacetCount

public int getFacetCount()

getSlotCount

public int getSlotCount()

getClsCount

public int getClsCount()

getFrames

public Collection getFrames()

getMatchingFrames

public Collection getMatchingFrames(Slot slot,
                                    Facet facet,
                                    boolean isTemplate,
                                    String s,
                                    int maxMatches)

getFramesWithValue

public Collection getFramesWithValue(Slot slot,
                                     Facet facet,
                                     boolean isTemplate,
                                     Object o)

getReferences

public Collection getReferences(Object o,
                                int maxReferences)

getValue

public Object getValue(Frame frame,
                       Slot slot,
                       Facet facet,
                       boolean isTemplate)

getValueCount

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

getValues

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

hasValue

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

hasValueAtSomeFrame

public boolean hasValueAtSomeFrame(Slot slot,
                                   Facet facet,
                                   boolean isTemplate)

moveValue

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

remove

public void remove(Frame frame,
                   Slot slot,
                   Facet facet,
                   boolean isTemplate)

removeFrame

public void removeFrame(Frame frame)

removeSingleValue

public void removeSingleValue(Frame frame,
                              Slot slot,
                              Facet facet,
                              boolean isTemplate,
                              Object value)
remove a single occurance of value from the slot/facet value


removeValues

public void removeValues(Slot slot,
                         Facet facet,
                         boolean isTemplate,
                         Cls cls)

replace

public void replace(Frame from,
                    Frame to)

setValue

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

setValues

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

supportsTransactions

public boolean supportsTransactions()

Protege 2.1

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