public interface JavaFileGenerator
.java files
from an ontology.| Modifier and Type | Interface and Description |
|---|---|
static class |
JavaFileGenerator.InvalidOntologyException
Exception signalizing that the ontology to build was found invalid.
|
static class |
JavaFileGenerator.JavaFileGenerationException
Exception signalizing an error during Java file generation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRDF(InputStream rdfInput,
String format)
Adds RDF statements containing ontology information.
|
void |
addRDF(InputStream rdfInput,
String base,
String format)
Adds RDF statements containing ontology information.
|
void |
addRDF(String url,
String format)
Adds RDF statements containing ontology information.
|
void |
addRDF(String url,
String base,
String format)
Adds RDF statements containing ontology information.
|
void |
generateJavaFiles(OntGenerationConfig config,
File outputDirectory)
Generates
.java files of resource objects (see ResourceObject)
and support classes (see ResourceObjectSupport) for
the classes defined in a ontology. |
void addRDF(InputStream rdfInput, String format)
addRDF methods may be called
arbitrarily often (but at least once) before a subsequent call to
generateJavaFiles(OntGenerationConfig, File).rdfInput - An input stream to RDF/XML data.format - The format of the RDF data. One of "RDF/XML", "N-TRIPLE", "TURTLE" (or "TTL") and "N3"
or null for the default format.void addRDF(String url, String format)
addRDF methods may be called
arbitrarily often (but at least once) before a subsequent call to
generateJavaFiles(OntGenerationConfig, File).url - An URL to RDF data in RDF/XML format.format - The format of the RDF data. One of "RDF/XML", "N-TRIPLE", "TURTLE" (or "TTL") and "N3"
or null for the default format.void addRDF(InputStream rdfInput, String base, String format)
addRDF methods may be called
arbitrarily often (but at least once) before a subsequent call to
generateJavaFiles(OntGenerationConfig, File).rdfInput - An input stream to the RDF data. Its format is defined by the format parameter.base - The base uri to be used when converting relative URI's to absolute URI's.format - The format of the RDF data. One of "RDF/XML", "N-TRIPLE", "TURTLE" (or "TTL") and "N3"
or null for the default format.void addRDF(String url, String base, String format)
addRDF methods may be called
arbitrarily often (but at least once) before a subsequent call to
generateJavaFiles(OntGenerationConfig, File).url - An URL to RDF data in the specified format.base - The base uri to be used when converting relative URI's to absolute URI's.format - The format of the RDF data. One of "RDF/XML", "N-TRIPLE", "TURTLE" (or "TTL") and "N3"
or null for the default format.void generateJavaFiles(OntGenerationConfig config, File outputDirectory) throws JavaFileGenerator.JavaFileGenerationException, IOException, org.openrdf.repository.RepositoryException
.java files of resource objects (see ResourceObject)
and support classes (see ResourceObjectSupport) for
the classes defined in a ontology.
Information about this ontology must be previously added with the addRDF methods.config - The configuration object defining how java classes are generated from an ontology.
For example a preference for the language of generated JavaDoc can be set.outputDirectory - The directory where the generated .java files
(or their package directories respectively) are stored.
Will be created if it does not exist. If the directory is not empty
then existing files may be overwritten.JavaFileGenerator.JavaFileGenerationException - Thrown if an error occurred during file generation.IOException - Thrown if an error occurs while writing the generated files.org.openrdf.repository.RepositoryException - Thrown if an error occurs while querying the repository.Copyright © 2017 Chair of Distributed Information Systems - University of Passau. All rights reserved.