Examples of OWLLiteral


Examples of org.semanticweb.owlapi.model.OWLLiteral

    @SuppressWarnings("null")
    @Override
    public OWLLiteral getOWLLiteral(@Nonnull String lexicalValue,
            @Nonnull OWLDatatype datatype) {
        OWLLiteral literal;
        if (datatype.isRDFPlainLiteral()) {
            int sep = lexicalValue.lastIndexOf('@');
            if (sep != -1) {
                String lex = lexicalValue.substring(0, sep);
                String lang = lexicalValue.substring(sep + 1);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLLiteral

    }

    @Nonnull
    protected OWLLiteral getBasicLiteral(@Nonnull String lexicalValue,
            String lang, OWLDatatype datatype) {
        OWLLiteral literal = null;
        if (useCompression) {
            if (datatype == null || datatype.isRDFPlainLiteral()) {
                literal = new OWLLiteralImplPlain(lexicalValue, lang);
            } else {
                literal = new OWLLiteralImpl(lexicalValue, lang, datatype);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLLiteral

    @Override
    protected OWLOntology createOntology() {
        OWLOntology ont = getOWLOntology("AnnotationOntology");
        OWLAnnotationProperty prop = AnnotationProperty(IRI("http://www.semanticweb.org/ontologies/test/annotationont#prop"));
        OWLLiteral value = Literal(33);
        OWLAnnotation annotation = Annotation(prop, value);
        ont.getOWLOntologyManager().applyChange(
                new AddOntologyAnnotation(ont, annotation));
        ont.getOWLOntologyManager().addAxiom(ont, Declaration(prop));
        return ont;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLLiteral

        @Override
        public void handleTriple(@Nonnull IRI subject, @Nonnull IRI predicate,
                @Nonnull IRI object) {
            IRI source = source(subject);
            IRI property = property(subject);
            OWLLiteral target = target(subject);
            OWLIndividual sourceInd = consumer.getOWLIndividual(source);
            OWLDataPropertyExpression prop = consumer
                    .translateDataPropertyExpression(property);
            consumeTriple(subject, predicate, object);
            consumer.translateAnnotations(subject);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLLiteral

                    sourceInd, target, annos));
        }

        @Nonnull
        OWLLiteral target(IRI subject) {
            OWLLiteral target = consumer.getLiteralObject(subject,
                    OWL_TARGET_VALUE.getIRI(), true);
            if (target == null) {
                target = consumer.getLiteralObject(subject,
                        DeprecatedVocabulary.OWL_OBJECT, true);
            }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLLiteral

    }

    private OWLAxiom parseDataPropertyAssertion() {
        OWLIndividual subj;
        OWLDataPropertyExpression prop;
        OWLLiteral obj;
        prop = parseDataPropertyId();
        jj_consume_token(OPENPAR);
        subj = parseIndividualId();
        jj_consume_token(31);
        obj = parseLiteral();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLLiteral

        jj_consume_token(CLOSEBRACE);
        return factory.getOWLObjectOneOf(inds);
    }

    private OWLDataRange parseDataOneOf() {
        OWLLiteral val;
        Set<OWLLiteral> values = new HashSet<OWLLiteral>();
        jj_consume_token(OPENBRACE);
        val = parseLiteral();
        values.add(val);
        label_7: while (true) {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLLiteral

        /*
         * If it's a label, grab it as the result. Note that if there are
         * multiple labels, the last one will be used.
         */
        if (node.getProperty().isLabel()) {
            OWLLiteral c = (OWLLiteral) node.getValue();
            result = c.getLiteral();
        }
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLLiteral

            annotations.addAll(getSynonymTypeAnnotations(matcher));
            annotations.addAll(getXRefAnnotations(matcher));
            OWLEntity subject = getConsumer().getCurrentEntity();
            String synonym = matcher.group(VALUE_GROUP);
            assert synonym != null;
            OWLLiteral synonymLiteral = df.getOWLLiteral(synonym);
            OWLAnnotationAssertionAxiom annoAssertion = df
                    .getOWLAnnotationAssertionAxiom(property, subject.getIRI(),
                            synonymLiteral, annotations);
            applyChange(new AddAxiom(getOntology(), annoAssertion));
        }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLLiteral

            OWLAnnotationProperty subsetdefAnnotationProperty = df
                    .getOWLAnnotationProperty(subsetdefIRI);
            applyChange(new AddAxiom(getOntology(),
                    df.getOWLSubAnnotationPropertyOfAxiom(annotationProperty,
                            subsetdefAnnotationProperty)));
            OWLLiteral nameLiteral = df.getOWLLiteral(name);
            applyChange(new AddAxiom(getOntology(),
                    df.getOWLAnnotationAssertionAxiom(df.getRDFSLabel(),
                            annotationPropertyIRI, nameLiteral)));
        } else {
            OWLAnnotation annotation = getAnnotationForTagValuePair(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.