Package org.semanticweb.owlapi.vocab

Examples of org.semanticweb.owlapi.vocab.OWL2Datatype


                    }
                }
            }
            // All facets must be allowed for the restricted datatype
            for (OWLFacetRestriction r : node.getFacetRestrictions()) {
                OWL2Datatype dt = node.getDatatype().getBuiltInDatatype();
                if (!dt.getFacets().contains(r.getFacet())) {
                    profileViolations.add(new UseOfIllegalFacetRestriction(
                            getCurrentOntology(), getCurrentAxiom(), node, r
                                    .getFacet()));
                }
            }
View Full Code Here


@SuppressWarnings("javadoc")
public class BuiltInDatatypesTestCase extends TestBase {

    @Test
    public void testBuiltInDatatypes() {
        OWL2Datatype dt = OWL2Datatype
                .getDatatype(OWLRDFVocabulary.RDF_PLAIN_LITERAL.getIRI());
        assertNotNull("object should not be null", dt);
        dt = OWL2Datatype.getDatatype(OWLRDFVocabulary.RDFS_LITERAL.getIRI());
        assertNotNull("object should not be null", dt);
        OWLDatatype datatype = df.getOWLDatatype(OWLRDFVocabulary.RDFS_LITERAL
                .getIRI());
        assertNotNull("object should not be null", datatype);
        OWL2Datatype test = datatype.getBuiltInDatatype();
        assertEquals(test, dt);
    }
View Full Code Here

    public void testFailure() {
        for (IRI type : OWL2Datatype.getDatatypeIRIs()) {
            assert type != null;
            OWLDatatype datatype = df.getOWLDatatype(type);
            if (datatype.isBuiltIn()) {
                OWL2Datatype builtInDatatype = datatype.getBuiltInDatatype();
                assertNotNull("object should not be null", builtInDatatype);
            }
        }
    }
View Full Code Here

                    false);
            if (literal == null) {
                return false;
            }
            OWLDatatype datatype = literal.getDatatype();
            OWL2Datatype nni = OWL2Datatype.XSD_NON_NEGATIVE_INTEGER;
            return datatype.getIRI().equals(nni.getIRI())
                    && nni.isInLexicalSpace(literal.getLiteral());
        }
View Full Code Here

                    false);
            if (literal == null) {
                return false;
            }
            OWLDatatype datatype = literal.getDatatype();
            OWL2Datatype nni = OWL2Datatype.XSD_NON_NEGATIVE_INTEGER;
            return datatype.getIRI().equals(nni.getIRI())
                    && nni.isInLexicalSpace(literal.getLiteral());
        }
View Full Code Here

                }
            }

            // All facets must be allowed for the restricted datatype
            for (OWLFacetRestriction r : node.getFacetRestrictions()) {
                OWL2Datatype dt = node.getDatatype().getBuiltInDatatype();
                if (!dt.getFacets().contains(r.getFacet())) {
                    profileViolations.add(new UseOfIllegalFacetRestriction(getCurrentOntology(), getCurrentAxiom(), node, r.getFacet()));
                }
            }
            return null;
        }
View Full Code Here

        String literal = l.getLiteral();
       
        Literal res = null;
       
        if(dt.isBuiltIn()) {
            OWL2Datatype odt = dt.getBuiltInDatatype();
            switch (odt) {
                case RDF_PLAIN_LITERAL:
                case RDF_XML_LITERAL:
                case XSD_STRING:
                case XSD_NORMALIZED_STRING:
View Full Code Here

        OWLLiteral literal = consumer.getLiteralObject(mainNode, predicate, false);
        if (literal == null) {
            return false;
        }
        OWLDatatype datatype = literal.getDatatype();
        OWL2Datatype nni = OWL2Datatype.XSD_NON_NEGATIVE_INTEGER;
        return datatype.getIRI().equals(nni.getIRI()) && nni.isInLexicalSpace(literal.getLiteral());
    }
View Full Code Here

        OWLLiteral literal = consumer.getLiteralObject(mainNode, predicate, false);
        if(literal == null) {
            return false;
        }
        OWLDatatype datatype = literal.getDatatype();
        OWL2Datatype nni = OWL2Datatype.XSD_NON_NEGATIVE_INTEGER;
        return datatype.getIRI().equals(nni.getIRI()) && nni.isInLexicalSpace(literal.getLiteral());
    }
View Full Code Here

                }
            }

            // All facets must be allowed for the restricted datatype
            for (OWLFacetRestriction r : node.getFacetRestrictions()) {
                OWL2Datatype dt = node.getDatatype().getBuiltInDatatype();
                if (!dt.getFacets().contains(r.getFacet())) {
                    profileViolations.add(new UseOfIllegalFacetRestriction(getCurrentOntology(), getCurrentAxiom(), node, r.getFacet()));
                }
            }
            return null;
        }
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.vocab.OWL2Datatype

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.