Protege 3.0

edu.stanford.smi.protege.model.framestore
Class DefaultFrameFactory

java.lang.Object
  extended byedu.stanford.smi.protege.model.framestore.DefaultFrameFactory
All Implemented Interfaces:
FrameFactory

public class DefaultFrameFactory
extends Object
implements FrameFactory


Constructor Summary
DefaultFrameFactory(KnowledgeBase kb)
           
 
Method Summary
 void addJavaPackage(String packageName)
           
protected  void configureCls(Cls cls)
           
protected  void configureFacet(Facet facet)
           
protected  void configureSimpleInstance(SimpleInstance simpleInstance)
           
protected  void configureSlot(Slot slot)
           
protected  Cls createCls(FrameID id, Class implementationClass)
           
 Cls createCls(FrameID id, Collection directTypes)
           
protected  Facet createFacet(FrameID id, Class implementationClass)
           
 Facet createFacet(FrameID id, Collection directTypes)
           
 Frame createFrameFromClassId(int javaClassId, FrameID id)
           
protected  SimpleInstance createSimpleInstance(FrameID id, Class implementationClass)
           
 SimpleInstance createSimpleInstance(FrameID id, Collection directTypes)
           
protected  Slot createSlot(FrameID id, Class implementationClass)
           
 Slot createSlot(FrameID id, Collection directTypes)
           
 Collection getClsJavaClassIds()
           
 Collection getFacetJavaClassIds()
           
 int getJavaClassId(Frame frame)
           
protected  String getJavaClassName(Cls type)
           
 KnowledgeBase getKnowledgeBase()
           
 Collection getSimpleInstanceJavaClassIds()
           
 Collection getSlotJavaClassIds()
           
 boolean isCorrectJavaImplementationClass(FrameID id, Collection types, Class clas)
           
protected  boolean isValidCharacter(char c, int i)
           
 void removeJavaPackage(String packageName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFrameFactory

public DefaultFrameFactory(KnowledgeBase kb)
Method Detail

getKnowledgeBase

public KnowledgeBase getKnowledgeBase()

addJavaPackage

public void addJavaPackage(String packageName)
Specified by:
addJavaPackage in interface FrameFactory

removeJavaPackage

public void removeJavaPackage(String packageName)
Specified by:
removeJavaPackage in interface FrameFactory

createCls

public Cls createCls(FrameID id,
                     Collection directTypes)
Specified by:
createCls in interface FrameFactory

createCls

protected Cls createCls(FrameID id,
                        Class implementationClass)

createSlot

public Slot createSlot(FrameID id,
                       Collection directTypes)
Specified by:
createSlot in interface FrameFactory

createSlot

protected Slot createSlot(FrameID id,
                          Class implementationClass)

createFacet

public Facet createFacet(FrameID id,
                         Collection directTypes)
Specified by:
createFacet in interface FrameFactory

createFacet

protected Facet createFacet(FrameID id,
                            Class implementationClass)

createSimpleInstance

public SimpleInstance createSimpleInstance(FrameID id,
                                           Collection directTypes)
Specified by:
createSimpleInstance in interface FrameFactory

createSimpleInstance

protected SimpleInstance createSimpleInstance(FrameID id,
                                              Class implementationClass)

configureFacet

protected void configureFacet(Facet facet)

configureSimpleInstance

protected void configureSimpleInstance(SimpleInstance simpleInstance)

configureCls

protected void configureCls(Cls cls)

configureSlot

protected void configureSlot(Slot slot)

isCorrectJavaImplementationClass

public boolean isCorrectJavaImplementationClass(FrameID id,
                                                Collection types,
                                                Class clas)
Specified by:
isCorrectJavaImplementationClass in interface FrameFactory

getJavaClassName

protected String getJavaClassName(Cls type)

isValidCharacter

protected boolean isValidCharacter(char c,
                                   int i)

getJavaClassId

public int getJavaClassId(Frame frame)
Specified by:
getJavaClassId in interface FrameFactory
Returns:
integer to map this frame to a Java class. This integer may then be passed in later to the createFrameFromClassId method

createFrameFromClassId

public Frame createFrameFromClassId(int javaClassId,
                                    FrameID id)
Specified by:
createFrameFromClassId in interface FrameFactory
Returns:
frame appropriate for this java class id.

getClsJavaClassIds

public Collection getClsJavaClassIds()
Specified by:
getClsJavaClassIds in interface FrameFactory
Returns:
all java class ids which correspond to classes. The collection contains java.lang.Integer objects.

getSlotJavaClassIds

public Collection getSlotJavaClassIds()
Specified by:
getSlotJavaClassIds in interface FrameFactory
Returns:
all java class ids which correspond to slots

getFacetJavaClassIds

public Collection getFacetJavaClassIds()
Specified by:
getFacetJavaClassIds in interface FrameFactory
Returns:
all java class ids which correspond to facets

getSimpleInstanceJavaClassIds

public Collection getSimpleInstanceJavaClassIds()
Specified by:
getSimpleInstanceJavaClassIds in interface FrameFactory
Returns:
all java class ids which correspond to simple instances

Protege 3.0

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