protected boolean isNonNegativeIntegerLax(IRI mainNode, OWLRDFVocabulary predicate) {
   OWLLiteral literal = consumer.getLiteralObject(mainNode, predicate, false);
   if (literal == null) {
     return false;
   }
   return OWL2Datatype.XSD_INTEGER.isInLexicalSpace(literal.getLiteral().trim());
 }
Example #2
0
 @Test
 public void testSetContainsInt() {
   OWLDatatypeImpl datatype = new OWLDatatypeImpl(OWL2Datatype.XSD_INTEGER.getIRI());
   OWLLiteral litNoComp = new OWLLiteralImplNoCompression("3", null, datatype);
   OWLLiteral litNoComp2 = new OWLLiteralImplNoCompression("3", null, datatype);
   OWLLiteral litIntImpl = new OWLLiteralImplInteger(3, datatype);
   assertEquals(litNoComp, litIntImpl);
   Set<OWLLiteral> lncset = new HashSet<OWLLiteral>();
   lncset.add(litNoComp);
   assertTrue(lncset.contains(litNoComp2));
   assertTrue(lncset.contains(litIntImpl));
 }
 public OWL2ELProfile() {
   allowedDatatypes = new HashSet<IRI>();
   allowedDatatypes.add(OWLRDFVocabulary.RDF_XML_LITERAL.getIRI());
   allowedDatatypes.add(OWLRDFVocabulary.RDFS_LITERAL.getIRI());
   allowedDatatypes.add(OWL2Datatype.OWL_RATIONAL.getIRI());
   allowedDatatypes.add(OWL2Datatype.OWL_REAL.getIRI());
   allowedDatatypes.add(OWL2Datatype.XSD_DECIMAL.getIRI());
   allowedDatatypes.add(OWL2Datatype.XSD_DECIMAL.getIRI());
   allowedDatatypes.add(OWL2Datatype.XSD_INTEGER.getIRI());
   allowedDatatypes.add(OWL2Datatype.XSD_NON_NEGATIVE_INTEGER.getIRI());
   allowedDatatypes.add(OWL2Datatype.XSD_STRING.getIRI());
   allowedDatatypes.add(OWL2Datatype.XSD_NORMALIZED_STRING.getIRI());
   allowedDatatypes.add(OWL2Datatype.XSD_TOKEN.getIRI());
   allowedDatatypes.add(OWL2Datatype.XSD_NAME.getIRI());
   allowedDatatypes.add(OWL2Datatype.XSD_NCNAME.getIRI());
   allowedDatatypes.add(OWL2Datatype.XSD_NMTOKEN.getIRI());
   allowedDatatypes.add(OWL2Datatype.XSD_HEX_BINARY.getIRI());
   allowedDatatypes.add(OWL2Datatype.XSD_BASE_64_BINARY.getIRI());
   allowedDatatypes.add(OWL2Datatype.XSD_ANY_URI.getIRI());
   allowedDatatypes.add(OWL2Datatype.XSD_DATE_TIME.getIRI());
   allowedDatatypes.add(OWL2Datatype.XSD_DATE_TIME_STAMP.getIRI());
 }