Search in sources :

Example 1 with OWL2Datatype

use of org.semanticweb.owlapi.vocab.OWL2Datatype in project snow-owl by b2ihealthcare.

the class DelegateOntology method getRelationshipValueExpression.

private OWLDataHasValue getRelationshipValueExpression(final long typeId, RelationshipValueType valueType, final String rawValue) {
    final OWL2Datatype owl2Datatype = getOWL2Datatype(valueType);
    final OWLDataProperty property = getConceptDataProperty(typeId);
    final OWLLiteral owlLiteral = getOWLLiteral(rawValue, owl2Datatype);
    return getOWLDataHasValue(property, owlLiteral);
}
Also used : OWL2Datatype(org.semanticweb.owlapi.vocab.OWL2Datatype)

Example 2 with OWL2Datatype

use of org.semanticweb.owlapi.vocab.OWL2Datatype in project webprotege by protegeproject.

the class WebProtegeBidirectionalShortFormProvider method setupBuiltinObjectRenderings.

private void setupBuiltinObjectRenderings(OWLOntology rootOntology) {
    OWLDataFactory df = rootOntology.getOWLOntologyManager().getOWLDataFactory();
    for (IRI iri : OWLRDFVocabulary.BUILT_IN_ANNOTATION_PROPERTY_IRIS) {
        delegate.add(df.getOWLAnnotationProperty(iri));
    }
    delegate.add(df.getOWLThing());
    delegate.add(df.getOWLNothing());
    delegate.add(df.getOWLTopObjectProperty());
    delegate.add(df.getOWLBottomObjectProperty());
    delegate.add(df.getOWLBottomDataProperty());
    delegate.add(df.getOWLBottomDataProperty());
    for (OWL2Datatype datatype : OWL2Datatype.values()) {
        delegate.add(df.getOWLDatatype(datatype.getIRI()));
    }
    for (DublinCoreVocabulary vocabulary : DublinCoreVocabulary.values()) {
        delegate.add(df.getOWLAnnotationProperty(vocabulary.getIRI()));
    }
    for (OWLAnnotationProperty annotationProperty : SKOSVocabulary.getAnnotationProperties(df)) {
        delegate.add(annotationProperty);
    }
}
Also used : OWL2Datatype(org.semanticweb.owlapi.vocab.OWL2Datatype) DublinCoreVocabulary(org.semanticweb.owlapi.vocab.DublinCoreVocabulary)

Example 3 with OWL2Datatype

use of org.semanticweb.owlapi.vocab.OWL2Datatype in project snow-owl by b2ihealthcare.

the class DelegateOntology method addConcreteDomainMember.

private void addConcreteDomainMember(final ConcreteDomainFragment member, final Set<OWLClassExpression> intersection) {
    final long typeId = member.getTypeId();
    final String serializedValue = member.getSerializedValue();
    final DataType sctDataType = SnomedRefSetUtil.getDataType(Long.toString(member.getRefSetId()));
    final OWL2Datatype owl2Datatype = getOWL2Datatype(sctDataType);
    final OWLDataProperty property = getConceptDataProperty(typeId);
    final OWLLiteral owlLiteral = getOWLLiteral(serializedValue, owl2Datatype);
    final OWLDataHasValue valueExpression = getOWLDataHasValue(property, owlLiteral);
    intersection.add(valueExpression);
}
Also used : OWL2Datatype(org.semanticweb.owlapi.vocab.OWL2Datatype) DataType(com.b2international.snowowl.snomed.core.domain.refset.DataType)

Aggregations

OWL2Datatype (org.semanticweb.owlapi.vocab.OWL2Datatype)3 DataType (com.b2international.snowowl.snomed.core.domain.refset.DataType)1 DublinCoreVocabulary (org.semanticweb.owlapi.vocab.DublinCoreVocabulary)1