Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.IRI


            clause.addValue(propId);
            if (annVal instanceof OWLLiteral) {
                OWLLiteral owlLiteral = (OWLLiteral) annVal;
                clause.addValue(owlLiteral.getLiteral());
                OWLDatatype datatype = owlLiteral.getDatatype();
                IRI dataTypeIri = datatype.getIRI();
                if (!OWL2Datatype.isBuiltIn(dataTypeIri)) {
                    error("Untranslatable axiom due to unknown data type: "
                            + annVal, true);
                    return false;
                }
                if (Namespaces.XSD.inNamespace(dataTypeIri)) {
                    clause.addValue(dataTypeIri.prefixedBy("xsd:"));
                } else if (dataTypeIri.isPlainLiteral()) {
                    clause.addValue("xsd:string");
                } else {
                    clause.addValue(dataTypeIri.toString());
                }
            } else if (annVal instanceof IRI) {
                clause.addValue(getIdentifier((IRI) annVal));
            }
            frame.addClause(clause);
View Full Code Here


     *        the obj
     * @return the string
     */
    @Nullable
    public static String owlObjectToTag(OWLObject obj) {
        IRI iriObj = null;
        if (obj instanceof OWLNamedObject) {
            iriObj = ((OWLNamedObject) obj).getIRI();
        } else if (obj instanceof IRI) {
            iriObj = (IRI) obj;
        }
        if (iriObj == null) {
            return null;
        }
        String iri = iriObj.toString();
        String tag = ANNOTATIONPROPERTYMAP.get(iri);
        if (tag == null) {
            // hardcoded values for legacy annotation properties: (TEMPORARY)
            if (iri.startsWith(Obo2OWLConstants.DEFAULT_IRI_PREFIX + "IAO_")) {
                String legacyId = iri.replace(
View Full Code Here

        @Nullable
        @Override
        public OWLClass getOWLClass(@Nonnull String name) {
            OWLClass owlClass = defaultInstance.getOWLClass(name);
            if (owlClass == null) {
                IRI iri = getIRI(name);
                if (iri != null) {
                    owlClass = getOWLClass(iri);
                }
            }
            return owlClass;
View Full Code Here

        @Override
        public OWLObjectProperty getOWLObjectProperty(@Nonnull String name) {
            OWLObjectProperty owlObjectProperty = defaultInstance
                    .getOWLObjectProperty(name);
            if (owlObjectProperty == null) {
                IRI iri = getIRI(name);
                if (iri != null) {
                    owlObjectProperty = getOWLObjectProperty(iri);
                }
            }
            return owlObjectProperty;
View Full Code Here

        @Override
        public OWLNamedIndividual getOWLIndividual(@Nonnull String name) {
            OWLNamedIndividual owlIndividual = defaultInstance
                    .getOWLIndividual(name);
            if (owlIndividual == null) {
                IRI iri = getIRI(name);
                if (iri != null) {
                    owlIndividual = getOWLIndividual(iri);
                }
            }
            return owlIndividual;
View Full Code Here

        }
        pending.add(node);
        RDFTriple candidatePrettyPrintTypeTriple = null;
        Collection<RDFTriple> triples = graph.getTriplesForSubject(node, true);
        for (RDFTriple triple : triples) {
            IRI propertyIRI = triple.getPredicate().getIRI();
            if (propertyIRI.equals(RDF_TYPE.getIRI())
                    && !triple.getObject().isAnonymous()
                    && BUILT_IN_VOCABULARY_IRIS.contains(triple.getObject()
                            .getIRI())
                    && prettyPrintedTypes.contains(triple.getObject().getIRI())) {
                candidatePrettyPrintTypeTriple = triple;
View Full Code Here

        }
    }

    IRI getIRI(String _s) {
        String s = base + _s;
        IRI iri = string2IRI.get(s);
        if (iri == null) {
            iri = IRI.create(s);
            string2IRI.put(s, iri);
        }
        return iri;
View Full Code Here

        }
        return desc;
    }

    private OWLClassExpression ConceptName() {
        IRI iri;
        iri = Name();
        return dataFactory.getOWLClass(iri);
    }
View Full Code Here

        jj_consume_token(CLOSEPAR);
        return dataFactory.getOWLObjectExactCardinality(card, prop, filler);
    }

    private OWLObjectProperty RoleName() {
        IRI iri;
        iri = Name();
        return dataFactory.getOWLObjectProperty(iri);
    }
View Full Code Here

        inds.add(indB);
        return dataFactory.getOWLDifferentIndividualsAxiom(inds);
    }

    private OWLIndividual IndividualName() {
        IRI name;
        name = Name();
        return dataFactory.getOWLNamedIndividual(name);
    }
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.model.IRI

Copyright © 2018 www.massapicom. 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.