|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.repository.object.compiler.OWLCompiler
public class OWLCompiler
Converts OWL ontologies into Java source code.
| Constructor Summary | |
|---|---|
OWLCompiler(RoleMapper mapper,
LiteralManager literals)
Constructs a new compiler instance using the existing Java classes referenced in the RoleMapper and
LiteralManager. |
|
| Method Summary | |
|---|---|
List<String> |
buildConcepts(File dir)
Build concepts in this directory |
List<String> |
compileBehaviours(File dir)
Compile behaviours to this directory. |
List<String> |
compileConcepts(File dir)
Build and compile concepts to this directory. |
ClassLoader |
createBehaviourJar(File jar)
Compile behaviours and save them to this jar file. |
ClassLoader |
createConceptJar(File jar)
Build concepts, compile them and save them to this jar file |
void |
saveConceptResources(File dir)
Save META-INF resource for concepts in this parent directory. |
void |
setBaseClasses(String[] baseClasses)
All concepts created will extend the give baseClasses. |
void |
setClassLoader(ClassLoader cl)
Set the classpath used when compiling. |
void |
setMemberPrefix(String prefix)
Override all the prefixes used in the model namespaces to this one. |
void |
setModel(Model model)
Assigns the schema that will be compiled. |
void |
setOntologies(Collection<URL> ontologies)
The given ontologies will be downloaded and included in the concept jar as resources. |
void |
setPackagePrefix(String prefix)
All Java classes created will use prepend this to their package name. |
void |
setPrefixNamespaces(Map<URI,Map<String,String>> namespaces)
Sets the prefixes for namespaces used in each graph of the model |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OWLCompiler(RoleMapper mapper,
LiteralManager literals)
RoleMapper and
LiteralManager.
| Method Detail |
|---|
public void setModel(Model model)
model - contains all relevant triplespublic void setPackagePrefix(String prefix)
#init().
public void setMemberPrefix(String prefix)
#init().
public void setPrefixNamespaces(Map<URI,Map<String,String>> namespaces)
public void setClassLoader(ClassLoader cl)
public void setBaseClasses(String[] baseClasses)
public void setOntologies(Collection<URL> ontologies)
public ClassLoader createConceptJar(File jar)
throws RepositoryException,
ObjectStoreConfigException
true
IllegalArgumentException - if no concepts found
RepositoryException
ObjectStoreConfigException
public ClassLoader createBehaviourJar(File jar)
throws RepositoryException,
ObjectStoreConfigException
true if the jar was create, false otherwise
RepositoryException
ObjectStoreConfigException
public List<String> compileBehaviours(File dir)
throws Exception
compileConcepts(File) should
be called and the concept jar should be included in the ClassLoader
.
Exception
public List<String> compileConcepts(File dir)
throws Exception
IllegalArgumentException - if no concepts found
Exception
public List<String> buildConcepts(File dir)
throws Exception
IllegalArgumentException - if no concepts found
Exception
public void saveConceptResources(File dir)
throws IOException
buildConcepts(File).
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||