|
Protege 3.4.5 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.smi.protege.model.Project
public class Project
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.
Field Summary | |
---|---|
protected static String |
CLASS_MAP
|
protected static String |
SLOT_PROPERTY_MAP
|
Constructor Summary | |
---|---|
|
Project(String projectString,
Collection errors)
|
protected |
Project(URI uri,
KnowledgeBaseFactory factory,
Collection errors,
boolean createDomainKB)
|
protected |
Project(URI uri,
KnowledgeBaseFactory factory,
Collection errors,
boolean createDomainKB,
boolean isMultiUserServer)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final String CLASS_MAP
protected static final String SLOT_PROPERTY_MAP
Constructor Detail |
---|
protected Project(URI uri, KnowledgeBaseFactory factory, Collection errors, boolean createDomainKB)
protected Project(URI uri, KnowledgeBaseFactory factory, Collection errors, boolean createDomainKB, boolean isMultiUserServer)
public Project(String projectString, Collection errors)
Method Detail |
---|
protected void onFrameReplace(Frame oldFrame, Frame newFrame)
public static boolean equals(Object o1, Object o2)
public void addJavaPackageName(String packageName)
public void addProjectListener(ProjectListener listener)
public void clearCachedWidgets()
public static Project createBuildProject(KnowledgeBaseFactory factory, Collection errors)
errors
- See class note for information about this argument.public static Project createBuildProject(KnowledgeBase kb, Collection errors)
public void createDomainKnowledgeBase(KnowledgeBaseFactory factory, Collection errors, boolean load)
errors
- See class note for information about this argument.protected JFrame createFrame(Cls cls, Slot slot)
protected JFrame createFrame(Instance instance)
public void setInstanceDisplayClass(Class instanceDisplayClass)
protected InstanceDisplay createInstanceDisplay(Project project, boolean showHeader, boolean showHeaderLabel)
protected JFrame createFrame(InstanceDisplay display, Object o)
public static Project createNewProject(KnowledgeBaseFactory factory, Collection errors)
errors
- See class note for information about this argument.public ClsWidget createRuntimeClsWidget(Instance instance)
public ClsWidget createRuntimeClsWidget(Instance instance, Cls associatedCls)
public ClsWidget createRuntimeClsWidget(Cls type, Instance instance, Cls associatedCls)
@Deprecated public Widget createRuntimeWidget(Instance instance)
public WidgetDescriptor createWidgetDescriptor()
public WidgetDescriptor createWidgetDescriptor(Cls cls, Slot slot, Facet facet)
public void dispose()
public Collection getAllKnowledgeBaseFactories()
@Deprecated public Slot getBrowserSlot(Cls cls)
public Collection getBrowserSlots(Cls cls)
public Collection<Cls> getClsesWithDirectBrowserSlots()
public Collection<Cls> getClsesWithCustomizedForms()
public Collection<Frame> getHiddenFrames()
public BrowserSlotPattern getBrowserSlotPattern(Cls cls)
@Deprecated public Slot getInheritedBrowserSlot(Cls cls)
getInheritedBrowserSlotPattern(Cls)
public BrowserSlotPattern getInheritedBrowserSlotPattern(Cls cls)
public PropertyList getClsWidgetPropertyList(Cls cls)
public String getDefaultWidgetClassName(Cls cls, Slot slot, Facet facet)
public ClsWidget getDesignTimeClsWidget(Cls cls)
@Deprecated public Slot getDirectBrowserSlot(Cls cls)
public BrowserSlotPattern getDirectBrowserSlotPattern(Cls cls)
public boolean getDisplayAbstractClassIcon()
public boolean getDisplayConfirmationOnRemove()
public boolean getDisplayHiddenClasses()
public boolean getDisplayHiddenFrames()
public boolean getDisplayMultiParentClassIcon()
public Collection<URI> getIncludedProjects()
public Tree<URI> getProjectTree()
public void setDirectIncludedProjectURIs(Collection projectURIs)
@Deprecated public Collection getDirectIncludedProjects()
public Collection<URI> getDirectIncludedProjectURIs()
public KnowledgeBase getInternalProjectKnowledgeBase()
public URI getJournalURI()
public KnowledgeBase getKnowledgeBase()
public KnowledgeBaseFactory getKnowledgeBaseFactory()
public String getName()
public String getProjectName()
public Collection<JFrame> getOpenWindows()
protected static Object getOwnSlotValue(Frame frame, String slotName)
protected static Reader getProjectClsesReader()
public URI getProjectURI()
public URI getProjectDirectoryURI()
@Deprecated public File getProjectDirectoryFile()
@Deprecated public File getProjectFile()
@Deprecated public String getProjectFilePath()
public Instance getProjectInstance()
protected static Instance getProjectInstance(KnowledgeBase kb)
protected static Reader getProjectInstancesReader(URI uri, KnowledgeBaseFactory factory, Collection errors)
public PropertyList getSources()
public Collection getSuitableWidgetClassNames(Cls cls, Slot slot, Facet facet)
public WidgetDescriptor getTabWidgetDescriptor(String widgetName)
public Collection<WidgetDescriptor> getTabWidgetDescriptors()
public boolean getUpdateModificationSlots()
public boolean hasCompleteSources()
public boolean hasCustomizedDescriptor(Cls cls)
public boolean hasIncludedProjects()
public void includeProject(String path, Collection errors)
public void includeProject(URI uri, Collection errors)
errors
- See class note for information about this argument.public void includeProject(URI uri, boolean doLoad, Collection errors)
errors
- See class note for information about this argument.public boolean isDirty()
public boolean isHidden(Frame frame)
public boolean isJournalingEnabled()
public boolean isReadonly()
public boolean isSuitableWidget(Cls cls, Slot slot, Facet facet, WidgetDescriptor d)
public void loadBrowserSlots(Instance projectInstance)
public void setDefaultClsWidgetClassName(String s)
public URI getLoadingURI()
public Collection loadIncludedProjects(URI projectURI, Instance projectInstance, Collection errors)
errors
- See class note for information about this argument.public static Project loadProjectFromURI(URI uri, Collection errors)
errors
- See class note for information about this argument.public static Project loadProjectFromURI(URI uri, Collection errors, boolean isMultiUserServer)
public static Project loadProjectFromFile(String fileName, Collection errors)
protected static KnowledgeBase loadProjectKB(URI uri, KnowledgeBaseFactory factory, Collection errors)
protected static void copyClientInformation(KnowledgeBase sourceKb, KnowledgeBase targetKb, KnowledgeBase domainKb, boolean appendInfo)
sourceKb
- - the source project KBtargetKb
- - the target project KBdomainKb
- - the target domain KBappendInfo
- - if true, it appends the source client information to the target client information.
If false, the target client info is overridden by the copied source client informationpublic void setWidgetMapper(WidgetMapper mapper)
public WidgetMapper getWidgetMapper()
public void mergeIncludedProjects()
public void postFormChangeEvent(Cls cls)
public void postFormChangeEvent(WidgetDescriptor d)
public void postProjectEvent(int type)
public void postProjectEvent(int type, ClsWidget widget)
public void removeIncludedProjectReferences()
public void removeJavaPackageName(String packageName)
public void removeProjectListener(ProjectListener listener)
protected static void removeUnreferencedInstances(KnowledgeBase kb)
public static boolean isNewProject(KnowledgeBase kb)
public void save(Collection errors)
public void clearIsDirty()
public void setDisplayAbstractClassIcon(boolean b)
public void setDisplayConfirmationOnRemove(boolean b)
public void setDisplayHiddenFrames(boolean b)
public void setDisplayHiddenClasses(boolean b)
public void setDisplayMultiParentClassIcon(boolean b)
public void setHidden(Frame frame, boolean hidden)
public void setIsReadonly(boolean b)
public void setJournalingEnabled(boolean enable)
public void setKnowledgeBaseFactory(KnowledgeBaseFactory factory)
public void setProjectFilePath(String s)
public void setProjectURI(URI uri)
public URI getActiveRootURI()
public void setActiveRootURI(URI uri)
public void setTabWidgetDescriptorOrder(Collection c)
public void setUpdateModificationSlots(boolean b)
public JFrame show(Cls cls, Slot slot)
public JFrame show(Instance instance)
public JFrame show(String instanceName)
public JInternalFrame showInInternalFrame(Instance instance)
public String toString()
toString
in class Object
public Object getClientInformation(Object key)
KnowledgeBase
class. Examples of this type of
information is the positioning of a yellow sticky on a form, or the
positioning of a node in the diagram widget.
a.equals(new MyClass(a.toString());
final String KEY = "MyClass.frame_rectangles";
Map frameRectangleMap = (Map) getClientInformation(KEY);
if (frameRectangleMap == null) {
frameRectangleMap = new HashMap();
getProject().setClientInformation(KEY, frameRectangleMap);
}
// ...
// save rectangles associated with frames into frameRectangleMap with code like
frameRectangleMap.put(frameX, rectangleX);
frameRectangleMap.put(frameY, rectangleY);
// ..
// elsewhere
// retrieve positions
Map map = (Map) getClientInformation(KEY);
Rectangle x = (Rectangle) map.get(frameX);
Rectangle y = (Rectangle) map.get(frameY);
public void setClientInformation(Object key, Object value)
getClientInformation(Object)
for more information about "client
information".
public Collection getCurrentUsers()
public String getLocalUser()
protected void setKnowledgeBases(KnowledgeBase domainKb, KnowledgeBase projectKb)
public FrameCounts getFrameCounts()
public boolean isMultiUserClient()
public boolean isMultiUserServer()
public String getUserName()
public void setPrettyPrintSlotWidgetLabels(boolean b)
public boolean getPrettyPrintSlotWidgetLabels()
public boolean getTabbedInstanceFormLayout()
public void setTabbedInstanceFormLayout(boolean b)
public boolean isUndoOptionEnabled()
public void setUndoOption(boolean enabled)
public boolean getAddNameOnInstanceForm()
public void setAddNameOnInstanceForm(boolean b)
public boolean getChangeTrackingActive()
public void setChangeTrackingActive(boolean b)
public boolean getSuppressInstanceCounting()
public void setSuppressInstanceCounting(boolean b)
|
Protege 3.4.5 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |