|
|||||||||
| Home >> All >> [ jena overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
jena
Class schemagen

java.lang.Objectjena.schemagen
- public class schemagen
- extends java.lang.Object
A vocabulary generator, that will consume an ontology or other vocabulary file, and generate a Java file with the constants from the vocabulary compiled in. Designed to be highly flexible and customisable.
- Version:
- CVS $Id: schemagen.java,v 1.40 2005/04/05 18:44:04 ian_dickinson Exp $
| Nested Class Summary | |
protected class |
schemagen.OptionDefinition
An option that can be set either on the command line or in the RDF config |
protected class |
schemagen.Replacement
A pairing of pattern and substitution we want to apply to output |
| Field Summary | |
static int |
COMMENT_LENGTH_LIMIT
Default line length for comments before wrap |
static java.lang.String |
DEFAULT_CONFIG_URI
The default location of the configuration model is null |
static java.lang.String |
DEFAULT_HEADER_TEMPLATE
Default template for the file header |
static java.lang.String |
DEFAULT_INDIVIDUAL_TEMPLATE
Default template for writing out individual declarations |
static java.lang.String |
DEFAULT_MARKER
The default marker string for denoting substitutions is null |
static java.lang.String |
DEFAULT_TEMPLATE
Default template for writing out value declarations |
protected java.util.List |
m_cmdLineArgs
The list of command line arguments |
protected com.hp.hpl.jena.rdf.model.Model |
m_config
The model that contains the configuration information |
protected java.util.List |
m_includeURI
List of allowed namespace URI strings for admissible values |
protected int |
m_indentStep
Size of indent step |
protected org.apache.oro.text.regex.PatternMatcher |
m_matcher
Perl5 pattern matcher |
protected java.lang.String |
m_nl
Output file newline char - default is Unix, override with --dos |
protected java.lang.Object[][] |
m_optionDefinitions
Option definitions |
protected java.io.PrintStream |
m_output
The output stream we write to |
protected org.apache.oro.text.regex.Perl5Compiler |
m_perlCompiler
Perl5 pattern compiler |
protected java.util.List |
m_replacements
Stack of replacements to apply |
protected java.util.Map |
m_resourcesToNames
Map from resources to java names |
protected com.hp.hpl.jena.rdf.model.Resource |
m_root
The root of the options in the config file |
protected com.hp.hpl.jena.ontology.OntModel |
m_source
The model that contains the input source |
protected java.util.Set |
m_usedNames
Set of names used so far |
static java.lang.String |
NS
The namespace for the configuration model is null |
protected static java.lang.Object |
OPT_CLASS_SECTION
Section declaration for class section; use --classSection <...> on command line; use sgen:classSection in config file |
protected static java.lang.Object |
OPT_CLASS_TEMPLATE
Template for writing out class declarations; use --classTemplate <...> on command line; use sgen:classTemplate in config file |
protected static java.lang.Object |
OPT_CLASSDEC
Additional decoration for class header (such as implements); use --classdec <classname> on command line; use sgen:classdec in config file |
protected static java.lang.Object |
OPT_CLASSNAME
The name of the generated class; use -n <classname> on command line; use sgen:classname in config file |
protected static java.lang.Object |
OPT_CLASSNAME_SUFFIX
Option for adding a suffix to the generated class name; use --classnamesuffix <uri> on command line; use sgen:classnamesuffix in config file |
protected static java.lang.Object |
OPT_CONFIG_FILE
Select an alternative config file; use -c <filename> on command line |
protected static java.lang.Object |
OPT_DECLARATIONS
Additional declarations to add at the top of the class; use --declarations <...> on command line; use sgen:declarations in config file |
protected static java.lang.Object |
OPT_DOS
Option to generate an output file with DOS (\r\n) line endings. |
protected static java.lang.Object |
OPT_ENCODING
Option for the presentation syntax (encoding) of the file; use -e encoding on command line; use sgen:encoding in config file |
protected static java.lang.Object |
OPT_FOOTER
Specify the file footer; use --footer "..." on command line; use sgen:footer in config file |
protected static java.lang.Object |
OPT_HEADER
Specify the file header; use --header "..." on command line; use sgen:header in config file |
protected static java.lang.Object |
OPT_HELP
Option to show the usage message; use --help on command line |
protected static java.lang.Object |
OPT_INCLUDE
Option for including non-local URI's in vocabulary; use --include <uri> on command line; use sgen:include in config file |
protected static java.lang.Object |
OPT_INDIVIDUAL_TEMPLATE
Template for writing out individual declarations; use --individualTemplate <...> on command line; use sgen:individualTemplate in config file |
protected static java.lang.Object |
OPT_INDIVIDUALS_SECTION
Section declaration for individuals section; use --individualsSection <...> on command line; use sgen:individualsSection in config file |
protected static java.lang.Object |
OPT_INPUT
Nominate the URL of the input document; use -i <URL> on command line; use sgen:input in config file |
protected static java.lang.Object |
OPT_LANG_DAML
Specify that the language of the source is DAML+OIL; use --daml on command line; use sgen:daml in config file |
protected static java.lang.Object |
OPT_LANG_OWL
Specify that the language of the source is OWL (the default); use --owl on command line; use sgen:owl in config file |
protected static java.lang.Object |
OPT_LANG_RDFS
Specify that the language of the source is RDFS; use --rdfs on command line; use sgen:rdfs in config file |
protected static java.lang.Object |
OPT_MARKER
Specify the marker string for substitutions, default is '%'; use -m "..." on command line; use sgen:marker in config file |
protected static java.lang.Object |
OPT_NAMESPACE
The namespace URI for the vocabulary; use - <uri> on command line; use sgen:namespace in config file |
protected static java.lang.Object |
OPT_NO_COMMENTS
Turn off all comment output; use --nocomments on command line; use sgen:noComments in config file |
protected static java.lang.Object |
OPT_NOCLASSES
Option to suppress classes in vocab file; use --noclasses <...> on command line; use sgen:noclasses in config file |
protected static java.lang.Object |
OPT_NOHEADER
Option for no file header; use --noheader <...> on command line; use sgen:noheader in config file |
protected static java.lang.Object |
OPT_NOINDIVIDUALS
Option to suppress individuals in vocab file; use --noindividuals <...> on command line; use sgen:noindividuals in config file |
protected static java.lang.Object |
OPT_NOPROPERTIES
Option to suppress properties in vocab file; use --noproperties <...> on command line; use sgen:noproperties in config file |
protected static java.lang.Object |
OPT_ONTOLOGY
Use ontology terms in preference to vanilla RDF; use --ontology on command line; use sgen:ontology in config file |
protected static java.lang.Object |
OPT_OUTPUT
Specify that destination file; use -o <fileName> on command line; use sgen:output in config file |
protected static java.lang.Object |
OPT_PACKAGENAME
Specify the packagename; use --package <packagename> on command line; use sgen:package in config file |
protected static java.lang.Object |
OPT_PROP_TEMPLATE
Template for writing out property declarations; use --propTemplate <...> on command line; use sgen:propTemplate in config file |
protected static java.lang.Object |
OPT_PROPERTY_SECTION
Section declaration for properties section; use --propSection <...> on command line; use sgen:propSection in config file |
protected static java.lang.Object |
OPT_ROOT
Specify the uri of the configuration root node; use --root <URL> on command line |
protected static java.lang.Object |
OPT_UC_NAMES
Option for mapping constant names to uppercase; use --uppercase <...> on command line; use sgen:uppercase in config file |
protected static java.lang.Object |
OPT_USE_INF
Option to generate to force the model to perform inference, off by default. |
| Constructor Summary | |
schemagen()
|
|
| Method Summary | |
protected void |
abort(java.lang.String msg,
java.lang.Exception e)
Abort due to exception |
protected void |
addReplacementPattern(java.lang.String key,
java.lang.String replacement)
Add a pattern-value pair to the list of available patterns |
protected java.lang.String |
asLegalJavaID(java.lang.String s,
boolean cap)
Convert s to a legal Java identifier; capitalise first char if cap is true |
protected void |
closeOutput()
Close the output file |
protected void |
determineConfigRoot()
Determine the root resource in the configuration file |
protected void |
determineLanguage()
Create the source model after determining which input language |
protected java.lang.String |
determineNamespaceURI()
Determine what the namespace URI for this vocabulary is |
protected boolean |
filter(com.hp.hpl.jena.rdf.model.Resource r)
Answer true if resource r does not show in output |
protected java.lang.String |
formatComment(java.lang.String comment)
Format the comment as Javadoc, and limit the line width |
protected java.util.List |
getAllValues(java.lang.Object option)
Answer all values for the given options as Strings |
protected java.lang.String |
getClassName()
Determine the class name of the vocabulary from the uri |
protected java.lang.String |
getComment(com.hp.hpl.jena.rdf.model.Resource r)
Answer all of the commentage on the given resource, as a string |
protected java.lang.String |
getImports()
Determine the list of imports to include in the file |
protected schemagen.OptionDefinition |
getOpt(java.lang.Object option)
Answer the option object for the given option |
protected com.hp.hpl.jena.rdf.model.Resource |
getResource(java.lang.Object option)
Answer the value of the option or null |
protected java.lang.String |
getUCValueName(com.hp.hpl.jena.rdf.model.Resource r)
Answer the local name of resource r mapped to upper case |
protected java.lang.String |
getValue(java.lang.Object option)
Answer the value of the option or null |
protected java.lang.String |
getValueName(com.hp.hpl.jena.rdf.model.Resource r,
java.lang.String disambiguator)
Answer the Java value name for the URI |
protected void |
go(java.lang.String[] args)
Read the configuration parameters and do setup |
protected boolean |
hasComment(com.hp.hpl.jena.rdf.model.Resource r)
Answer true if the given resource has an rdf:comment or daml:comment |
protected boolean |
hasResourceValue(java.lang.Object option)
Answer true if the given option has a resource value |
protected boolean |
hasValue(java.lang.Object option)
Answer true if the given option has value |
protected int |
indentTo(int i,
java.lang.StringBuffer buf)
Add the appropriate indent to a buffer |
protected boolean |
isTrue(java.lang.Object option)
Answer true if the given option is set to true |
static void |
main(java.lang.String[] args)
|
protected boolean |
noComments()
Answer true if all comments are suppressed |
protected void |
pop(int n)
Pop n replacements off the stack |
protected void |
processFooter()
Process the footer at the end of the file, if defined |
protected void |
processHeader()
Process the header at the start of the file, if defined |
protected void |
processInput()
The sequence of steps to process an entire file |
protected void |
selectInput()
Identify the URL that is to be read in and translated to a vocab file, and load the source into the source model |
protected void |
selectOutput()
Identify the file we are to write the output to |
protected void |
setGlobalReplacements()
The list of replacements that are always available |
protected java.lang.String |
substitute(java.lang.String sIn)
Use the current replacements list to do the subs in the given string |
protected java.lang.String |
urlCheck(java.lang.String uriOrFile)
Return a URI formed from the given string, unchanged if it's already a URI or converted to a file URI otherwise. |
protected void |
usage()
Print usage message and abort |
protected boolean |
useOntology()
Answer true if we are using ontology terms in this vocabulary |
protected void |
write(int indentLevel,
java.lang.String s)
Write out the given string with n spaces of indent |
protected void |
writeAnnotationProperties()
Write any annotation properties in the vocabulary |
protected void |
writeClassClose()
The close of the class decoration |
protected void |
writeClassDeclaration()
The opening class declaration |
protected void |
writeClasses()
Write any classes in the vocabulary |
protected void |
writeDatatypeProperties()
Write any datatype properties in the vocabulary |
protected void |
writeIndividuals()
Write any instances (individuals) in the vocabulary |
protected void |
writeInitialDeclarations()
Write the declarations at the head of the class |
protected void |
writeln(int indent)
Write a blank line, with indent and newline |
protected void |
writeln(int indent,
java.lang.String s)
Write out the given string with n spaces of indent, with newline |
protected void |
writeModelDeclaration()
Write the declaration of the model |
protected void |
writeNamespace()
Write the string and resource that represent the namespace |
protected void |
writeObjectProperties()
Write any object properties in the vocabulary |
protected void |
writeOntClasses()
Write classes as ontology terms |
protected void |
writeOntIndividuals()
Write individuals as ontology terms |
protected void |
writeProperties()
Write the list of properties |
protected void |
writeRDFClasses()
Write classes as vanilla RDF terms |
protected void |
writeRDFIndividuals()
Write individuals as vanilla RDF terms |
protected void |
writeRDFProperties()
Write any vanilla RDF properties in the vocabulary |
protected void |
writeValue(com.hp.hpl.jena.rdf.model.Resource r,
java.lang.String template,
java.lang.String valueClass,
java.lang.String creator,
java.lang.String disambiguator)
Write the value declaration out using the given template, optionally creating comments |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
NS
public static final java.lang.String NS
- The namespace for the configuration model is null
- See Also:
- Constant Field Values
DEFAULT_CONFIG_URI
public static final java.lang.String DEFAULT_CONFIG_URI
- The default location of the configuration model is null
- See Also:
- Constant Field Values
DEFAULT_MARKER
public static final java.lang.String DEFAULT_MARKER
- The default marker string for denoting substitutions is null
- See Also:
- Constant Field Values
DEFAULT_TEMPLATE
public static final java.lang.String DEFAULT_TEMPLATE
- Default template for writing out value declarations
- See Also:
- Constant Field Values
DEFAULT_INDIVIDUAL_TEMPLATE
public static final java.lang.String DEFAULT_INDIVIDUAL_TEMPLATE
- Default template for writing out individual declarations
- See Also:
- Constant Field Values
DEFAULT_HEADER_TEMPLATE
public static final java.lang.String DEFAULT_HEADER_TEMPLATE
- Default template for the file header
- See Also:
- Constant Field Values
COMMENT_LENGTH_LIMIT
public static final int COMMENT_LENGTH_LIMIT
- Default line length for comments before wrap
- See Also:
- Constant Field Values
OPT_CONFIG_FILE
protected static final java.lang.Object OPT_CONFIG_FILE
- Select an alternative config file; use
-c <filename>on command line
OPT_NO_COMMENTS
protected static final java.lang.Object OPT_NO_COMMENTS
- Turn off all comment output; use
--nocommentson command line; usesgen:noCommentsin config file
OPT_INPUT
protected static final java.lang.Object OPT_INPUT
- Nominate the URL of the input document; use
-i <URL>on command line; usesgen:inputin config file
OPT_LANG_DAML
protected static final java.lang.Object OPT_LANG_DAML
- Specify that the language of the source is DAML+OIL; use
--damlon command line; usesgen:damlin config file
OPT_LANG_OWL
protected static final java.lang.Object OPT_LANG_OWL
- Specify that the language of the source is OWL (the default); use
--owlon command line; usesgen:owlin config file
OPT_LANG_RDFS
protected static final java.lang.Object OPT_LANG_RDFS
- Specify that the language of the source is RDFS; use
--rdfson command line; usesgen:rdfsin config file
OPT_OUTPUT
protected static final java.lang.Object OPT_OUTPUT
- Specify that destination file; use
-o <fileName>on command line; usesgen:outputin config file
OPT_HEADER
protected static final java.lang.Object OPT_HEADER
- Specify the file header; use
--header "..."on command line; usesgen:headerin config file
OPT_FOOTER
protected static final java.lang.Object OPT_FOOTER
- Specify the file footer; use
--footer "..."on command line; usesgen:footerin config file
OPT_ROOT
protected static final java.lang.Object OPT_ROOT
- Specify the uri of the configuration root node; use
--root <URL>on command line
OPT_MARKER
protected static final java.lang.Object OPT_MARKER
- Specify the marker string for substitutions, default is '%'; use
-m "..."on command line; usesgen:markerin config file
OPT_PACKAGENAME
protected static final java.lang.Object OPT_PACKAGENAME
- Specify the packagename; use
--package <packagename>on command line; usesgen:packagein config file
OPT_ONTOLOGY
protected static final java.lang.Object OPT_ONTOLOGY
- Use ontology terms in preference to vanilla RDF; use
--ontologyon command line; usesgen:ontologyin config file
OPT_CLASSNAME
protected static final java.lang.Object OPT_CLASSNAME
- The name of the generated class; use
-n <classname>on command line; usesgen:classnamein config file
OPT_CLASSDEC
protected static final java.lang.Object OPT_CLASSDEC
- Additional decoration for class header (such as implements); use
--classdec <classname>on command line; usesgen:classdecin config file
OPT_NAMESPACE
protected static final java.lang.Object OPT_NAMESPACE
- The namespace URI for the vocabulary; use
- <uri>on command line; usesgen:namespacein config file
OPT_DECLARATIONS
protected static final java.lang.Object OPT_DECLARATIONS
- Additional declarations to add at the top of the class; use
--declarations <...>on command line; usesgen:declarationsin config file
OPT_PROPERTY_SECTION
protected static final java.lang.Object OPT_PROPERTY_SECTION
- Section declaration for properties section; use
--propSection <...>on command line; usesgen:propSectionin config file
OPT_CLASS_SECTION
protected static final java.lang.Object OPT_CLASS_SECTION
- Section declaration for class section; use
--classSection <...>on command line; usesgen:classSectionin config file
OPT_INDIVIDUALS_SECTION
protected static final java.lang.Object OPT_INDIVIDUALS_SECTION
- Section declaration for individuals section; use
--individualsSection <...>on command line; usesgen:individualsSectionin config file
OPT_NOPROPERTIES
protected static final java.lang.Object OPT_NOPROPERTIES
- Option to suppress properties in vocab file; use
--noproperties <...>on command line; usesgen:nopropertiesin config file
OPT_NOCLASSES
protected static final java.lang.Object OPT_NOCLASSES
- Option to suppress classes in vocab file; use
--noclasses <...>on command line; usesgen:noclassesin config file
OPT_NOINDIVIDUALS
protected static final java.lang.Object OPT_NOINDIVIDUALS
- Option to suppress individuals in vocab file; use
--noindividuals <...>on command line; usesgen:noindividualsin config file
OPT_NOHEADER
protected static final java.lang.Object OPT_NOHEADER
- Option for no file header; use
--noheader <...>on command line; usesgen:noheaderin config file
OPT_PROP_TEMPLATE
protected static final java.lang.Object OPT_PROP_TEMPLATE
- Template for writing out property declarations; use
--propTemplate <...>on command line; usesgen:propTemplatein config file
OPT_CLASS_TEMPLATE
protected static final java.lang.Object OPT_CLASS_TEMPLATE
- Template for writing out class declarations; use
--classTemplate <...>on command line; usesgen:classTemplatein config file
OPT_INDIVIDUAL_TEMPLATE
protected static final java.lang.Object OPT_INDIVIDUAL_TEMPLATE
- Template for writing out individual declarations; use
--individualTemplate <...>on command line; usesgen:individualTemplatein config file
OPT_UC_NAMES
protected static final java.lang.Object OPT_UC_NAMES
- Option for mapping constant names to uppercase; use
--uppercase <...>on command line; usesgen:uppercasein config file
OPT_INCLUDE
protected static final java.lang.Object OPT_INCLUDE
- Option for including non-local URI's in vocabulary; use
--include <uri>on command line; usesgen:includein config file
OPT_CLASSNAME_SUFFIX
protected static final java.lang.Object OPT_CLASSNAME_SUFFIX
- Option for adding a suffix to the generated class name; use
--classnamesuffix <uri>on command line; usesgen:classnamesuffixin config file
OPT_ENCODING
protected static final java.lang.Object OPT_ENCODING
- Option for the presentation syntax (encoding) of the file; use
-e encodingon command line; usesgen:encodingin config file
OPT_HELP
protected static final java.lang.Object OPT_HELP
- Option to show the usage message; use --help on command line
OPT_DOS
protected static final java.lang.Object OPT_DOS
- Option to generate an output file with DOS (\r\n) line endings. Default is Unix line endings.
OPT_USE_INF
protected static final java.lang.Object OPT_USE_INF
- Option to generate to force the model to perform inference, off by default.
m_cmdLineArgs
protected java.util.List m_cmdLineArgs
- The list of command line arguments
m_root
protected com.hp.hpl.jena.rdf.model.Resource m_root
- The root of the options in the config file
m_config
protected com.hp.hpl.jena.rdf.model.Model m_config
- The model that contains the configuration information
m_source
protected com.hp.hpl.jena.ontology.OntModel m_source
- The model that contains the input source
m_output
protected java.io.PrintStream m_output
- The output stream we write to
m_optionDefinitions
protected java.lang.Object[][] m_optionDefinitions
- Option definitions
m_replacements
protected java.util.List m_replacements
- Stack of replacements to apply
m_perlCompiler
protected org.apache.oro.text.regex.Perl5Compiler m_perlCompiler
- Perl5 pattern compiler
m_matcher
protected org.apache.oro.text.regex.PatternMatcher m_matcher
- Perl5 pattern matcher
m_nl
protected java.lang.String m_nl
- Output file newline char - default is Unix, override with --dos
m_indentStep
protected int m_indentStep
- Size of indent step
m_usedNames
protected java.util.Set m_usedNames
- Set of names used so far
m_resourcesToNames
protected java.util.Map m_resourcesToNames
- Map from resources to java names
m_includeURI
protected java.util.List m_includeURI
- List of allowed namespace URI strings for admissible values
| Constructor Detail |
schemagen
public schemagen()
| Method Detail |
main
public static void main(java.lang.String[] args)
go
protected void go(java.lang.String[] args)
- Read the configuration parameters and do setup
processInput
protected void processInput()
- The sequence of steps to process an entire file
determineConfigRoot
protected void determineConfigRoot()
- Determine the root resource in the configuration file
determineLanguage
protected void determineLanguage()
- Create the source model after determining which input language
selectInput
protected void selectInput()
- Identify the URL that is to be read in and translated to a vocab file, and load the source into the source model
selectOutput
protected void selectOutput()
- Identify the file we are to write the output to
processHeader
protected void processHeader()
- Process the header at the start of the file, if defined
processFooter
protected void processFooter()
- Process the footer at the end of the file, if defined
setGlobalReplacements
protected void setGlobalReplacements()
- The list of replacements that are always available
addReplacementPattern
protected void addReplacementPattern(java.lang.String key, java.lang.String replacement)
- Add a pattern-value pair to the list of available patterns
pop
protected void pop(int n)
- Pop n replacements off the stack
closeOutput
protected void closeOutput()
- Close the output file
isTrue
protected boolean isTrue(java.lang.Object option)
- Answer true if the given option is set to true
hasValue
protected boolean hasValue(java.lang.Object option)
- Answer true if the given option has value
hasResourceValue
protected boolean hasResourceValue(java.lang.Object option)
- Answer true if the given option has a resource value
getValue
protected java.lang.String getValue(java.lang.Object option)
- Answer the value of the option or null
getAllValues
protected java.util.List getAllValues(java.lang.Object option)
- Answer all values for the given options as Strings
getResource
protected com.hp.hpl.jena.rdf.model.Resource getResource(java.lang.Object option)
- Answer the value of the option or null
getOpt
protected schemagen.OptionDefinition getOpt(java.lang.Object option)
- Answer the option object for the given option
abort
protected void abort(java.lang.String msg, java.lang.Exception e)
- Abort due to exception
usage
protected void usage()
- Print usage message and abort
substitute
protected java.lang.String substitute(java.lang.String sIn)
- Use the current replacements list to do the subs in the given string
indentTo
protected int indentTo(int i,
java.lang.StringBuffer buf)
- Add the appropriate indent to a buffer
writeln
protected void writeln(int indent)
- Write a blank line, with indent and newline
writeln
protected void writeln(int indent,
java.lang.String s)
- Write out the given string with n spaces of indent, with newline
write
protected void write(int indentLevel,
java.lang.String s)
- Write out the given string with n spaces of indent
getImports
protected java.lang.String getImports()
- Determine the list of imports to include in the file
getClassName
protected java.lang.String getClassName()
- Determine the class name of the vocabulary from the uri
useOntology
protected boolean useOntology()
- Answer true if we are using ontology terms in this vocabulary
noComments
protected boolean noComments()
- Answer true if all comments are suppressed
asLegalJavaID
protected java.lang.String asLegalJavaID(java.lang.String s, boolean cap)
- Convert s to a legal Java identifier; capitalise first char if cap is true
writeClassDeclaration
protected void writeClassDeclaration()
- The opening class declaration
writeClassClose
protected void writeClassClose()
- The close of the class decoration
writeInitialDeclarations
protected void writeInitialDeclarations()
- Write the declarations at the head of the class
writeModelDeclaration
protected void writeModelDeclaration()
- Write the declaration of the model
writeNamespace
protected void writeNamespace()
- Write the string and resource that represent the namespace
determineNamespaceURI
protected java.lang.String determineNamespaceURI()
- Determine what the namespace URI for this vocabulary is
writeProperties
protected void writeProperties()
- Write the list of properties
writeObjectProperties
protected void writeObjectProperties()
- Write any object properties in the vocabulary
writeDatatypeProperties
protected void writeDatatypeProperties()
- Write any datatype properties in the vocabulary
writeAnnotationProperties
protected void writeAnnotationProperties()
- Write any annotation properties in the vocabulary
writeRDFProperties
protected void writeRDFProperties()
- Write any vanilla RDF properties in the vocabulary
writeClasses
protected void writeClasses()
- Write any classes in the vocabulary
writeOntClasses
protected void writeOntClasses()
- Write classes as ontology terms
writeRDFClasses
protected void writeRDFClasses()
- Write classes as vanilla RDF terms
writeIndividuals
protected void writeIndividuals()
- Write any instances (individuals) in the vocabulary
writeOntIndividuals
protected void writeOntIndividuals()
- Write individuals as ontology terms
writeRDFIndividuals
protected void writeRDFIndividuals()
- Write individuals as vanilla RDF terms
writeValue
protected void writeValue(com.hp.hpl.jena.rdf.model.Resource r, java.lang.String template, java.lang.String valueClass, java.lang.String creator, java.lang.String disambiguator)
- Write the value declaration out using the given template, optionally creating comments
hasComment
protected boolean hasComment(com.hp.hpl.jena.rdf.model.Resource r)
- Answer true if the given resource has an rdf:comment or daml:comment
getComment
protected java.lang.String getComment(com.hp.hpl.jena.rdf.model.Resource r)
- Answer all of the commentage on the given resource, as a string
formatComment
protected java.lang.String formatComment(java.lang.String comment)
- Format the comment as Javadoc, and limit the line width
filter
protected boolean filter(com.hp.hpl.jena.rdf.model.Resource r)
- Answer true if resource r does not show in output
getValueName
protected java.lang.String getValueName(com.hp.hpl.jena.rdf.model.Resource r, java.lang.String disambiguator)
- Answer the Java value name for the URI
getUCValueName
protected java.lang.String getUCValueName(com.hp.hpl.jena.rdf.model.Resource r)
- Answer the local name of resource r mapped to upper case
urlCheck
protected java.lang.String urlCheck(java.lang.String uriOrFile)
- Return a URI formed from the given string, unchanged if it's already a URI or
converted to a file URI otherwise. If not recognisable as a URL, abort.
|
|||||||||
| Home >> All >> [ jena overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
jena.schemagen