Protege-2000 1.7

edu.stanford.smi.protege.model
Class Project

java.lang.Object
  |
  +--edu.stanford.smi.protege.model.Project

public class Project
extends Object

The aggregation of a domain knowledge base with its user interface. Methods on this class that take an "errors" collection may insert any object into this collection These objects can be strings or exceptions. All that is guaranteed is that the toString() method on each object will produce a usable error message. If the method call succeeds then no error objects will have been added to the collection. Eventually this hack will be replaced with some more reasonable interface for collecting errors. Note that we do not want to throw an exception because we would like to accumulate errors (e.g. parse errors) and let the user know about them all at once rather than one at a time. One downside of the current approach is that it leads to cascading errors.

Author:
Ray Fergerson

Constructor Summary
Project(String filename, Collection errors)
          creates a project and loads the project kb from the project file and the associated domain kb
 
Method Summary
 void addJavaPackageName(String packageName)
           
 void addProjectListener(ProjectListener listener)
           
static Project createBuildProject(KnowledgeBaseFactory factory, Collection errors)
           
 void createDomainKnowledgeBase(KnowledgeBaseFactory factory, Collection errors, boolean load)
           
static Project createFileProject(String fileName, Collection errors)
           
static Project createNewProject(KnowledgeBaseFactory factory, Collection errors)
           
 ClsWidget createRuntimeClsWidget(Instance instance)
           
 Widget createRuntimeWidget(Instance instance)
          Deprecated. use createRuntimeClsWidget
 WidgetDescriptor createWidgetDescriptor()
           
 WidgetDescriptor createWidgetDescriptor(Cls cls, Slot slot, Facet facet)
           
 void dispose()
           
static boolean equals(Object o1, Object o2)
           
 void finalize()
           
 Collection getAllKnowledgeBaseFactories()
           
 Slot getBrowserSlot(Cls cls)
           
 PropertyList getClsWidgetPropertyList(Cls cls)
           
 String getDefaultWidgetClassName(Cls cls, Slot slot, Facet facet)
           
 ClsWidget getDesignTimeClsWidget(Cls cls)
           
 Slot getDirectBrowserSlot(Cls cls)
           
 Collection getDirectIncludedProjects()
           
 boolean getDisplayAbstractClassIcon()
           
 boolean getDisplayConfirmationOnRemove()
           
 boolean getDisplayHiddenClasses()
           
 boolean getDisplayMultiParentClassIcon()
           
 Collection getIncludedProjects()
           
 KnowledgeBase getInternalProjectKnowledgeBase()
           
 String getJournalFile()
           
 KnowledgeBase getKnowledgeBase()
           
 KnowledgeBaseFactory getKnowledgeBaseFactory()
           
 String getName()
           
 Collection getOpenWindows()
           
 File getProjectDirectory()
           
 File getProjectFile()
           
 String getProjectFilePath()
           
 String getProjectName()
           
 Map getPropertyMap()
           
 PropertyList getSources()
           
 Collection getSuitableWidgetClassNames(Cls cls, Slot slot, Facet facet)
           
 WidgetDescriptor getTabWidgetDescriptor(String widgetName)
           
 Collection getTabWidgetDescriptors()
           
 boolean getUpdateModificationSlots()
           
 boolean hasCompleteSources()
           
 boolean hasCustomizedDescriptor(Cls cls)
           
 boolean hasIncludedProjects()
           
 void includeProject(String filePath, boolean doLoad, Collection errors)
           
 void includeProject(String fileName, Collection errors)
           
 boolean isDirty()
           
 boolean isHidden(Frame frame)
           
 boolean isJournalingEnabled()
           
 boolean isReadonly()
           
 boolean isSuitableWidget(Cls cls, Slot slot, Facet facet, WidgetDescriptor d)
           
 void loadBrowserSlots(Instance projectInstance)
           
 void loadIncludedProjects(Instance projectInstance, Collection errors)
           
static Project loadProjectFromFile(String fileName, Collection errors)
           
 void mergeIncludedFrames()
           
 void mergeIncludedProjects()
           
 void postFormChangeEvent(Cls cls)
           
 void postFormChangeEvent(WidgetDescriptor d)
           
 void postProjectEvent(int type)
           
 void postProjectEvent(int type, Object arg1)
           
 void removeIncludedProjectReferences()
           
 void removeJavaPackageName(String packageName)
           
 void removeProjectListener(ProjectListener listener)
           
 void save(Collection errors)
           
 void setDirectBrowserSlot(Cls cls, Slot slot)
           
 void setDisplayAbstractClassIcon(boolean b)
           
 void setDisplayConfirmationOnRemove(boolean b)
           
 void setDisplayHiddenClasses(boolean b)
           
 void setDisplayMultiParentClassIcon(boolean b)
           
 void setHidden(Frame frame, boolean hidden)
           
 void setIsReadonly(boolean b)
           
 void setJournalingEnabled(boolean enable)
           
 void setKnowledgeBaseFactory(KnowledgeBaseFactory factory)
           
 void setProjectFilePath(String path)
           
 void setTabWidgetDescriptorOrder(Collection c)
           
 void setUpdateModificationSlots(boolean b)
           
 JFrame show(Cls cls, Slot slot)
           
 JFrame show(Instance instance)
           
 JFrame show(String instanceName)
           
 JInternalFrame showInInternalFrame(Instance instance)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Project

public Project(String filename,
               Collection errors)
creates a project and loads the project kb from the project file and the associated domain kb
Parameters:
errors - See class note for information about this argument.
Method Detail

addJavaPackageName

public void addJavaPackageName(String packageName)

addProjectListener

public void addProjectListener(ProjectListener listener)

createBuildProject

public static Project createBuildProject(KnowledgeBaseFactory factory,
                                         Collection errors)
Parameters:
errors - See class note for information about this argument.

createDomainKnowledgeBase

public void createDomainKnowledgeBase(KnowledgeBaseFactory factory,
                                      Collection errors,
                                      boolean load)
Parameters:
errors - See class note for information about this argument.

createFileProject

public static Project createFileProject(String fileName,
                                        Collection errors)
Parameters:
errors - See class note for information about this argument.

createNewProject

public static Project createNewProject(KnowledgeBaseFactory factory,
                                       Collection errors)
Parameters:
errors - See class note for information about this argument.

createRuntimeClsWidget

public ClsWidget createRuntimeClsWidget(Instance instance)

createRuntimeWidget

public Widget createRuntimeWidget(Instance instance)
Deprecated. use createRuntimeClsWidget


createWidgetDescriptor

public WidgetDescriptor createWidgetDescriptor()

createWidgetDescriptor

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

dispose

public void dispose()

equals

public static boolean equals(Object o1,
                             Object o2)

finalize

public void finalize()
              throws Throwable
Overrides:
finalize in class Object

getAllKnowledgeBaseFactories

public Collection getAllKnowledgeBaseFactories()

getBrowserSlot

public Slot getBrowserSlot(Cls cls)

getClsWidgetPropertyList

public PropertyList getClsWidgetPropertyList(Cls cls)

getDefaultWidgetClassName

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

getDesignTimeClsWidget

public ClsWidget getDesignTimeClsWidget(Cls cls)

getDirectBrowserSlot

public Slot getDirectBrowserSlot(Cls cls)

getDisplayAbstractClassIcon

public boolean getDisplayAbstractClassIcon()

getDisplayConfirmationOnRemove

public boolean getDisplayConfirmationOnRemove()

getDisplayHiddenClasses

public boolean getDisplayHiddenClasses()

getDisplayMultiParentClassIcon

public boolean getDisplayMultiParentClassIcon()

getIncludedProjects

public Collection getIncludedProjects()
Returns:
the names of all included projects, including indirectly included ones

getDirectIncludedProjects

public Collection getDirectIncludedProjects()
Returns:
the names of all directly included projects

getInternalProjectKnowledgeBase

public KnowledgeBase getInternalProjectKnowledgeBase()

getJournalFile

public String getJournalFile()

getKnowledgeBase

public KnowledgeBase getKnowledgeBase()

getKnowledgeBaseFactory

public KnowledgeBaseFactory getKnowledgeBaseFactory()

getName

public String getName()

getOpenWindows

public Collection getOpenWindows()

getProjectDirectory

public File getProjectDirectory()

getProjectFile

public File getProjectFile()

getProjectFilePath

public String getProjectFilePath()

getProjectName

public String getProjectName()

getPropertyMap

public Map getPropertyMap()

getSources

public PropertyList getSources()

getSuitableWidgetClassNames

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

getTabWidgetDescriptor

public WidgetDescriptor getTabWidgetDescriptor(String widgetName)

getTabWidgetDescriptors

public Collection getTabWidgetDescriptors()

getUpdateModificationSlots

public boolean getUpdateModificationSlots()

hasCompleteSources

public boolean hasCompleteSources()

hasCustomizedDescriptor

public boolean hasCustomizedDescriptor(Cls cls)

hasIncludedProjects

public boolean hasIncludedProjects()

includeProject

public void includeProject(String fileName,
                           Collection errors)
Parameters:
errors - See class note for information about this argument.

includeProject

public void includeProject(String filePath,
                           boolean doLoad,
                           Collection errors)
Parameters:
errors - See class note for information about this argument.

isDirty

public boolean isDirty()

isHidden

public boolean isHidden(Frame frame)

isJournalingEnabled

public boolean isJournalingEnabled()

isReadonly

public boolean isReadonly()

isSuitableWidget

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

loadBrowserSlots

public void loadBrowserSlots(Instance projectInstance)

loadIncludedProjects

public void loadIncludedProjects(Instance projectInstance,
                                 Collection errors)
Parameters:
errors - See class note for information about this argument.

loadProjectFromFile

public static Project loadProjectFromFile(String fileName,
                                          Collection errors)
Parameters:
errors - See class note for information about this argument.

mergeIncludedFrames

public void mergeIncludedFrames()

mergeIncludedProjects

public void mergeIncludedProjects()

postFormChangeEvent

public void postFormChangeEvent(Cls cls)

postFormChangeEvent

public void postFormChangeEvent(WidgetDescriptor d)

postProjectEvent

public void postProjectEvent(int type)

postProjectEvent

public void postProjectEvent(int type,
                             Object arg1)

removeIncludedProjectReferences

public void removeIncludedProjectReferences()

removeJavaPackageName

public void removeJavaPackageName(String packageName)

removeProjectListener

public void removeProjectListener(ProjectListener listener)

save

public void save(Collection errors)

setDirectBrowserSlot

public void setDirectBrowserSlot(Cls cls,
                                 Slot slot)

setDisplayAbstractClassIcon

public void setDisplayAbstractClassIcon(boolean b)

setDisplayConfirmationOnRemove

public void setDisplayConfirmationOnRemove(boolean b)

setDisplayHiddenClasses

public void setDisplayHiddenClasses(boolean b)

setDisplayMultiParentClassIcon

public void setDisplayMultiParentClassIcon(boolean b)

setHidden

public void setHidden(Frame frame,
                      boolean hidden)

setIsReadonly

public void setIsReadonly(boolean b)

setJournalingEnabled

public void setJournalingEnabled(boolean enable)

setKnowledgeBaseFactory

public void setKnowledgeBaseFactory(KnowledgeBaseFactory factory)

setProjectFilePath

public void setProjectFilePath(String path)

setTabWidgetDescriptorOrder

public void setTabWidgetDescriptorOrder(Collection c)

setUpdateModificationSlots

public void setUpdateModificationSlots(boolean b)

show

public JFrame show(Cls cls,
                   Slot slot)

show

public JFrame show(Instance instance)

show

public JFrame show(String instanceName)

showInInternalFrame

public JInternalFrame showInInternalFrame(Instance instance)

toString

public String toString()
Overrides:
toString in class Object

Protege-2000 1.7

Submit a bug report or feature request
Protege-2000 is a trademark of Stanford University.
Copyright (c) 1998-2002 Stanford University.