Protege 3.4.8

edu.stanford.smi.protege.code.generator.wrapping
Class OntologyJavaMappingUtil

java.lang.Object
  extended by edu.stanford.smi.protege.code.generator.wrapping.OntologyJavaMappingUtil

public class OntologyJavaMappingUtil
extends Object


Constructor Summary
OntologyJavaMappingUtil()
           
 
Method Summary
static void add(String protegeClassName, Class<?> javaInterface, Class<?> javaImplementation)
           
static
<X> X
as(Object impl, Class<? extends X> javaInterface)
           
static boolean canAs(Object impl, Class<?> javaInterface)
           
static
<X> X
createObject(KnowledgeBase kb, String name, String protegeClsName, Class<? extends X> javaReturnInterface)
           
static
<X> X
createObjectAs(KnowledgeBase kb, String name, Class<? extends X> javaInterface)
          Creates object as the java interface passed as argument.
static void dispose()
           
static
<X> X
getJavaObjectAs(KnowledgeBase kb, String name, Class<? extends X> javaInterface)
           
static
<X> X
getSpecificObject(KnowledgeBase kb, Instance wrappedInst, Class<? extends X> javaReturnInterface)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OntologyJavaMappingUtil

public OntologyJavaMappingUtil()
Method Detail

add

public static void add(String protegeClassName,
                       Class<?> javaInterface,
                       Class<?> javaImplementation)

createObjectAs

public static <X> X createObjectAs(KnowledgeBase kb,
                                   String name,
                                   Class<? extends X> javaInterface)
Creates object as the java interface passed as argument. Argument name is the name of the created wrapped instance. If an instance with the name "name" already exists, it will return null.


createObject

public static <X> X createObject(KnowledgeBase kb,
                                 String name,
                                 String protegeClsName,
                                 Class<? extends X> javaReturnInterface)

getJavaObjectAs

public static <X> X getJavaObjectAs(KnowledgeBase kb,
                                    String name,
                                    Class<? extends X> javaInterface)

getSpecificObject

public static <X> X getSpecificObject(KnowledgeBase kb,
                                      Instance wrappedInst,
                                      Class<? extends X> javaReturnInterface)

canAs

public static boolean canAs(Object impl,
                            Class<?> javaInterface)

as

public static <X> X as(Object impl,
                       Class<? extends X> javaInterface)

dispose

public static void dispose()

Protege 3.4.8

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