edu.stanford.smi.protegex.owl.model.factory
Class OWLJavaFactory
java.lang.Object
edu.stanford.smi.protege.model.framestore.DefaultFrameFactory
edu.stanford.smi.protegex.owl.model.factory.OWLJavaFactory
- All Implemented Interfaces:
- edu.stanford.smi.protege.model.FrameFactory
- Direct Known Subclasses:
- SWRLJavaFactory
- public class OWLJavaFactory
- extends edu.stanford.smi.protege.model.framestore.DefaultFrameFactory
A DefaultFrameFactory that creates the proper Java objects for Protege frames.
- Author:
- Holger Knublauch
Fields inherited from class edu.stanford.smi.protege.model.framestore.DefaultFrameFactory |
|
Methods inherited from class edu.stanford.smi.protege.model.framestore.DefaultFrameFactory |
addJavaPackage, configureCls, configureFacet, configureSimpleInstance, configureSlot, createCls, createFacet, createFacet, createFrameFromClassId, createSimpleInstance, createSlot, getClsJavaClassIds, getFacetJavaClassIds, getImplementationClass, getJavaClassId, getJavaClassName, getKnowledgeBase, getSimpleInstanceJavaClassIds, getSlotJavaClassIds, isValidCharacter, removeJavaPackage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
clsNames
private static Hashtable clsNames
- A Hashtable from Protege metaclass names to Java class names from this package
CLASSNAME_PREFIX
private static final String CLASSNAME_PREFIX
- See Also:
- Constant Field Values
owlModel
private AbstractOWLModel owlModel
OWLJavaFactory
public OWLJavaFactory(AbstractOWLModel owlModel)
as
public RDFResource as(RDFResource resource,
Class javaInterface)
canAs
public boolean canAs(RDFResource resource,
Class javaInterface)
getImplementationClassName
public String getImplementationClassName(Class javaInterface)
getImplementationClass
public Class getImplementationClass(Class javaInterface)
throws ClassNotFoundException
- Throws:
ClassNotFoundException
getImplementationConstructor
public Constructor getImplementationConstructor(Class javaInterface)
getJavaInterfaceName
public String getJavaInterfaceName(RDFSClass cls)
createCls
public edu.stanford.smi.protege.model.Cls createCls(edu.stanford.smi.protege.model.FrameID id,
Collection directTypes)
- Creates instances of the corresponding subclass of DefaultCls if one of the metaclasses of
the directTypes list is an OWL metaclass.
- Parameters:
id
- directTypes
-
- Returns:
- the new Cls object
createCls
private edu.stanford.smi.protege.model.Cls createCls(String javaClassName,
edu.stanford.smi.protege.model.FrameID id)
createSimpleInstance
public edu.stanford.smi.protege.model.SimpleInstance createSimpleInstance(edu.stanford.smi.protege.model.FrameID id,
Collection directTypes)
createSlot
public edu.stanford.smi.protege.model.Slot createSlot(edu.stanford.smi.protege.model.FrameID id,
Collection directTypes)
isCorrectJavaImplementationClass
public boolean isCorrectJavaImplementationClass(edu.stanford.smi.protege.model.FrameID id,
Collection types,
Class clas)