public class OWLConverter extends Object
Modifier and Type | Field and Description |
---|---|
protected static RDFXMLOntologyFormat |
format
Create OWLAPI utilities: An ontology format.
|
protected static String |
IAO
Define the base IRI for Information Artifact Ontology (IAO) terms.
|
protected static org.apache.log4j.Logger |
logger
Create a logger.
|
protected static String |
NCBI
Define the base IRI for NCBI Taxonomy terms.
|
protected static String |
OBO
Define the base IRI for Open Biomedical Ontologies (OBO).
|
protected static String |
OIO
Define the base IRI for OboInOwl terms.
|
Constructor and Description |
---|
OWLConverter() |
Modifier and Type | Method and Description |
---|---|
protected static OWLAnnotationAssertionAxiom |
annotate(OWLOntology ontology,
OWLEntity subject,
OWLAnnotationProperty property,
OWLAnnotationValue value)
Convenience method for adding an annotation assertion to the
ontology.
|
protected static OWLAnnotationAssertionAxiom |
annotate(OWLOntology ontology,
OWLEntity subject,
String propertyCURIE,
boolean value)
Convenience method for adding an annotation assertion to the
ontology, taking a CURIE for the property and an Boolean literal.
|
protected static OWLAnnotationAssertionAxiom |
annotate(OWLOntology ontology,
OWLEntity subject,
String propertyCURIE,
OWLAnnotationValue value)
Convenience method for adding an annotation assertion to the
ontology, taking a CURIE for the property.
|
protected static OWLAnnotationAssertionAxiom |
annotate(OWLOntology ontology,
OWLEntity subject,
String propertyCURIE,
String value)
Convenience method for adding an annotation assertion to the
ontology, taking a CURIE for the property and a string literal.
|
protected static OWLAnnotation |
annotate(OWLOntology ontology,
String propertyCURIE,
IRI value)
Convenience method for adding an annotation assertion to the
ontology itself, taking a CURIE for the property and an Boolean literal.
|
protected static OWLAnnotation |
annotate(OWLOntology ontology,
String propertyCURIE,
String value)
Convenience method for adding an annotation assertion to the
ontology itself, taking a CURIE for the property and an Boolean literal.
|
protected static OWLSubAnnotationPropertyOfAxiom |
assertSubAnnotationProperty(OWLOntology ontology,
OWLAnnotationProperty child,
OWLAnnotationProperty parent)
Convenience method for asserting a subAnnotationProperty relation
between a parent and child property in an ontology.
|
protected static OWLSubClassOfAxiom |
assertSubClass(OWLOntology ontology,
OWLClass child,
OWLClass parent)
Convenience method for asserting a subClass relation between
a parent and child class in an ontology.
|
protected static OWLAnnotationProperty |
createAnnotationProperty(OWLOntology ontology,
IRI iri)
Create an annotation property and add it to the ontology.
|
protected static OWLAnnotationProperty |
createAnnotationProperty(OWLOntology ontology,
org.obolibrary.obo2owl.Obo2OWLConstants.Obo2OWLVocabulary term)
Convenience method for adding and labelling OboInOwl annotation
properties with its rdfs:label.
|
protected static OWLAnnotationProperty |
createAnnotationProperty(OWLOntology ontology,
String curie)
Convenience method taking a string CURIE instead of an IRI.
|
protected static OWLDeclarationAxiom |
declare(OWLOntology ontology,
OWLEntity subject)
Convenience method for adding a declaration axiom to the ontology.
|
protected static String |
getFirstLiteral(OWLOntology ontology,
OWLEntity subject,
IRI propertyIRI)
Convenience method to get the first string literal of an
annotation property.
|
protected static String |
getFirstLiteral(OWLOntology ontology,
OWLEntity taxon,
OWLAnnotationProperty property)
Convenience method to get the first string literal of an
annotation property.
|
protected static String |
getFirstLiteral(OWLOntology ontology,
OWLEntity subject,
String propertyCURIE)
Convenience method to get the first string literal of an
annotation property.
|
protected static RDFXMLOntologyFormat |
initializeFormat()
Initialize the format with standard default prefixes
(rdf, rdfs, xsd, owl) and with the prefixes we will use
(obo, oio, iao).
|
protected static String |
reformatName(String name)
Reformat names for use in IRIs.
|
protected static OWLAnnotationAssertionAxiom |
synonym(OWLOntology ontology,
OWLEntity subject,
OWLAnnotationValue type,
OWLAnnotationProperty property,
OWLAnnotationValue value)
Add an synonym annotation, plus an annotation on that annotation
that specified the type of synonym.
|
protected static OWLAnnotationAssertionAxiom |
synonym(OWLOntology ontology,
OWLEntity subject,
String typeCURIE,
String propertyCURIE,
String value)
Add an synonym annotation, plus an annotation on that annotation
that specified the type of synonym.
|
protected static OWLAnnotationAssertionAxiom |
updateAnnotation(OWLOntology ontology,
OWLEntity subject,
String propertyCURIE,
String value) |
protected static final String OBO
protected static final String OIO
protected static final String IAO
protected static final String NCBI
protected static final org.apache.log4j.Logger logger
protected static RDFXMLOntologyFormat format
protected static RDFXMLOntologyFormat initializeFormat()
protected static String reformatName(String name)
name
- the string to reformatprotected static OWLAnnotationProperty createAnnotationProperty(OWLOntology ontology, IRI iri)
ontology
- the current ontologyiri
- the IRI for the annotation propertyprotected static OWLAnnotationProperty createAnnotationProperty(OWLOntology ontology, String curie)
ontology
- the current ontologycurie
- will be expanded using the format.getIRI methodprotected static OWLAnnotationProperty createAnnotationProperty(OWLOntology ontology, org.obolibrary.obo2owl.Obo2OWLConstants.Obo2OWLVocabulary term)
ontology
- the current ontologyterm
- the Obo2Owl term to useObo2OWLConstants.Obo2OWLVocabulary
protected static OWLDeclarationAxiom declare(OWLOntology ontology, OWLEntity subject)
ontology
- the current ontologysubject
- the entity for which the declaration will be addedprotected static OWLAnnotationAssertionAxiom annotate(OWLOntology ontology, OWLEntity subject, OWLAnnotationProperty property, OWLAnnotationValue value)
ontology
- the current ontologysubject
- the subject of the annotationproperty
- the annotation propertyvalue
- the annotation valueprotected static OWLAnnotationAssertionAxiom annotate(OWLOntology ontology, OWLEntity subject, String propertyCURIE, OWLAnnotationValue value)
ontology
- the current ontologysubject
- the subject of the annotationpropertyCURIE
- will be expanded to the full annotation
property IRIvalue
- the annotation valueprotected static OWLAnnotationAssertionAxiom annotate(OWLOntology ontology, OWLEntity subject, String propertyCURIE, String value)
ontology
- the current ontologysubject
- the subject of the annotationpropertyCURIE
- will be expanded to the full annotation
property IRIvalue
- the literal value of the annotationprotected static OWLAnnotationAssertionAxiom annotate(OWLOntology ontology, OWLEntity subject, String propertyCURIE, boolean value)
ontology
- the current ontologysubject
- the subject of the annotationpropertyCURIE
- will be expanded to the full annotation
property IRIvalue
- the literal value of the annotationprotected static OWLAnnotation annotate(OWLOntology ontology, String propertyCURIE, IRI value)
ontology
- the current ontologypropertyCURIE
- will be expanded to the full annotation
property IRIvalue
- the literal value of the annotationprotected static OWLAnnotation annotate(OWLOntology ontology, String propertyCURIE, String value)
ontology
- the current ontologypropertyCURIE
- will be expanded to the full annotation
property IRIvalue
- the literal value of the annotationprotected static OWLAnnotationAssertionAxiom updateAnnotation(OWLOntology ontology, OWLEntity subject, String propertyCURIE, String value)
protected static OWLAnnotationAssertionAxiom synonym(OWLOntology ontology, OWLEntity subject, OWLAnnotationValue type, OWLAnnotationProperty property, OWLAnnotationValue value)
ontology
- the current ontologysubject
- the subject of the annotationtype
- the IRI of the type of synonymproperty
- the IRI of the annotation property.value
- the literal value of the synonymprotected static OWLAnnotationAssertionAxiom synonym(OWLOntology ontology, OWLEntity subject, String typeCURIE, String propertyCURIE, String value)
ontology
- the current ontologysubject
- the subject of the annotationtypeCURIE
- a CURIE string for the type of synonympropertyCURIE
- a CURIE string for the propertyvalue
- the string value of the synonymprotected static OWLSubClassOfAxiom assertSubClass(OWLOntology ontology, OWLClass child, OWLClass parent)
ontology
- the current ontologychild
- the child classparent
- the parent classprotected static OWLSubAnnotationPropertyOfAxiom assertSubAnnotationProperty(OWLOntology ontology, OWLAnnotationProperty child, OWLAnnotationProperty parent)
ontology
- the current ontologychild
- the child propertyparent
- the parent propertyprotected static String getFirstLiteral(OWLOntology ontology, OWLEntity taxon, OWLAnnotationProperty property)
ontology
- the current ontologytaxon
- the subjectproperty
- the propertyprotected static String getFirstLiteral(OWLOntology ontology, OWLEntity subject, IRI propertyIRI)
ontology
- the current ontologysubject
- the subjectpropertyIRI
- the property IRIprotected static String getFirstLiteral(OWLOntology ontology, OWLEntity subject, String propertyCURIE)
ontology
- the current ontologysubject
- the subjectpropertyCURIE
- the property CURIECopyright © 2010–2015. All rights reserved.