protege.code-generation.2.0.0.source-code.factory.owlclass Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of code-generation Show documentation
Show all versions of code-generation Show documentation
Generate Java code from an OWL ontology in the Protege Desktop editing environment.
The newest version!
/* ***************************************************
* Class ${classIri}
*/
{
javaMapping.add("${classIri}", ${interfaceName}.class, ${implementationName}.class);
}
/**
* Creates an instance of type ${interfaceName}. Modifies the underlying ontology.
*/
public ${interfaceName} create${interfaceName}(String name) {
return delegate.createWrappedIndividual(name, Vocabulary.${VocabClass}, ${implementationName}.class);
}
/**
* Gets an instance of type ${interfaceName} with the given name. Does not modify the underlying ontology.
* @param name the name of the OWL named individual to be retrieved.
*/
public ${interfaceName} get${interfaceName}(String name) {
return delegate.getWrappedIndividual(name, Vocabulary.${VocabClass}, ${implementationName}.class);
}
/**
* Gets all instances of ${interfaceName} from the ontology.
*/
public Collection extends ${interfaceName}> getAll${interfaceName}Instances() {
return delegate.getWrappedIndividuals(Vocabulary.${VocabClass}, ${implementationName}.class);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy