@Override void attribute(String localName, String value) { if (localName.equals(DATATYPE_IRI.getShortForm())) { IRI iri = handler.getIRI(value); OWLDatatype type = df.getOWLDatatype(iri); // do not set the type for string types - it overrides the language // tag if one exists if (!OWL2Datatype.RDF_LANG_STRING.matches(type) && !OWL2Datatype.RDF_PLAIN_LITERAL.matches(type) && !OWL2Datatype.XSD_STRING.matches(type)) { builder.withDatatype(iri); } } else if ("lang".equals(localName)) { builder.withLanguage(value); } }
@Override void attribute(String localName, String value) { if (localName.equals(DATATYPE_IRI.getShortForm())) { IRI iri = handler.getIRI(value); OWLDatatype type = df.getOWLDatatype(iri); // do not set the type for string types - it overrides the language // tag if one exists if (!OWL2Datatype.RDF_LANG_STRING.matches(type) && !OWL2Datatype.RDF_PLAIN_LITERAL.matches(type) && !OWL2Datatype.XSD_STRING.matches(type)) { builder.withDatatype(iri); } } else if ("lang".equals(localName)) { builder.withLanguage(value); } }
@Override void attribute(String localName, String value) { if (localName.equals(DATATYPE_IRI.getShortForm())) { IRI iri = handler.getIRI(value); OWLDatatype type = df.getOWLDatatype(iri); // do not set the type for string types - it overrides the language // tag if one exists if (!OWL2Datatype.RDF_LANG_STRING.matches(type) && !OWL2Datatype.RDF_PLAIN_LITERAL.matches(type) && !OWL2Datatype.XSD_STRING.matches(type)) { builder.withDatatype(iri); } } else if ("lang".equals(localName)) { builder.withLanguage(value); } }
@Override void attribute(String localName, String value) { if (localName.equals(DATATYPE_IRI.getShortForm())) { IRI iri = handler.getIRI(value); OWLDatatype type = df.getOWLDatatype(iri); // do not set the type for string types - it overrides the language // tag if one exists if (!OWL2Datatype.RDF_LANG_STRING.matches(type) && !OWL2Datatype.RDF_PLAIN_LITERAL.matches(type) && !OWL2Datatype.XSD_STRING.matches(type)) { builder.withDatatype(iri); } } else if ("lang".equals(localName)) { builder.withLanguage(value); } }
protected void examineAssertion(OWLPrimitive owlEntity, Set<OWLAxiom> axioms, OWLAnnotationAssertionAxiom ax) { if (ax.getSubject().equals(owlEntity)) { axioms.add(ax); } else { ax.getValue().asLiteral().ifPresent(lit -> { if (OWL2Datatype.XSD_ANY_URI.matches(lit.getDatatype()) && lit.getLiteral().equals(owlEntity.toString())) { axioms.add(ax); } }); } }
protected void examineAssertion(OWLPrimitive owlEntity, Set<OWLAxiom> axioms, OWLAnnotationAssertionAxiom ax) { if (ax.getSubject().equals(owlEntity)) { axioms.add(ax); } else { ax.getValue().asLiteral().ifPresent(lit -> { if (OWL2Datatype.XSD_ANY_URI.matches(lit.getDatatype()) && lit.getLiteral().equals(owlEntity.toString())) { axioms.add(ax); } }); } }
protected void examineAssertion(OWLPrimitive owlEntity, Set<OWLAxiom> axioms, OWLAnnotationAssertionAxiom ax) { if (ax.getSubject().equals(owlEntity)) { axioms.add(ax); } else { ax.getValue().asLiteral().ifPresent(lit -> { if (OWL2Datatype.XSD_ANY_URI.matches(lit.getDatatype()) && lit.getLiteral().equals(owlEntity.toString())) { axioms.add(ax); } }); } }
protected void examineAssertion(OWLPrimitive owlEntity, Set<OWLAxiom> axioms, OWLAnnotationAssertionAxiom ax) { if (ax.getSubject().equals(owlEntity)) { axioms.add(ax); } else { ax.getValue().asLiteral().ifPresent(lit -> { if (OWL2Datatype.XSD_ANY_URI.matches(lit.getDatatype()) && lit.getLiteral().equals(owlEntity.toString())) { axioms.add(ax); } }); } }
protected boolean isNonNegativeIntegerStrict(IRI mainNode, OWLRDFVocabulary p) { OWLLiteral literal = consumer.getLiteralObject(mainNode, p, false); if (literal == null) { return false; } return OWL2Datatype.XSD_NON_NEGATIVE_INTEGER.matches(literal.getDatatype()) && OWL2Datatype.XSD_NON_NEGATIVE_INTEGER.isInLexicalSpace(literal.getLiteral()); }
protected boolean isNonNegativeIntegerStrict(IRI mainNode, OWLRDFVocabulary p) { OWLLiteral literal = consumer.getLiteralObject(mainNode, p, false); if (literal == null) { return false; } return OWL2Datatype.XSD_NON_NEGATIVE_INTEGER.matches(literal.getDatatype()) && OWL2Datatype.XSD_NON_NEGATIVE_INTEGER.isInLexicalSpace(literal.getLiteral()); }
protected boolean isNonNegativeIntegerStrict(IRI mainNode, OWLRDFVocabulary p) { OWLLiteral literal = consumer.getLiteralObject(mainNode, p, false); if (literal == null) { return false; } return OWL2Datatype.XSD_NON_NEGATIVE_INTEGER.matches(literal.getDatatype()) && OWL2Datatype.XSD_NON_NEGATIVE_INTEGER.isInLexicalSpace(literal.getLiteral()); }
protected boolean isNonNegativeIntegerStrict(IRI mainNode, OWLRDFVocabulary p) { OWLLiteral literal = consumer.getLiteralObject(mainNode, p, false); if (literal == null) { return false; } return OWL2Datatype.XSD_NON_NEGATIVE_INTEGER.matches(literal.getDatatype()) && OWL2Datatype.XSD_NON_NEGATIVE_INTEGER.isInLexicalSpace(literal.getLiteral()); }
@Override public void visit(OWLLiteral node) { writer.writeStartElement(LITERAL); if (node.hasLang()) { writer.writeLangAttribute(node.getLang()); } else if (!node.isRDFPlainLiteral() && !OWL2Datatype.XSD_STRING.matches(node.getDatatype())) { writer.writeDatatypeAttribute(node.getDatatype()); } writer.writeTextContent(node.getLiteral()); writer.writeEndElement(); }
@Override public void visit(OWLLiteral node) { writer.writeStartElement(LITERAL); if (node.hasLang()) { writer.writeLangAttribute(node.getLang()); } else if (!node.isRDFPlainLiteral() && !OWL2Datatype.XSD_STRING.matches(node.getDatatype())) { writer.writeDatatypeAttribute(node.getDatatype()); } writer.writeTextContent(node.getLiteral()); writer.writeEndElement(); }
@Override public void visit(OWLLiteral node) { writer.writeStartElement(LITERAL); if (node.hasLang()) { writer.writeLangAttribute(node.getLang()); } else if (!node.isRDFPlainLiteral() && !OWL2Datatype.XSD_STRING.matches(node.getDatatype())) { writer.writeDatatypeAttribute(node.getDatatype()); } writer.writeTextContent(node.getLiteral()); writer.writeEndElement(); }
@Override public void visit(OWLLiteral node) { writer.writeStartElement(LITERAL); if (node.hasLang()) { writer.writeLangAttribute(node.getLang()); } else if (!node.isRDFPlainLiteral() && !OWL2Datatype.XSD_STRING.matches(node.getDatatype())) { writer.writeDatatypeAttribute(node.getDatatype()); } writer.writeTextContent(node.getLiteral()); writer.writeEndElement(); }
@Override public void visit(OWLLiteral node) { write("\""); write(EscapeUtils.escapeString(node.getLiteral())); write("\""); if (node.hasLang()) { write("@"); write(node.getLang()); } else if (!node.isRDFPlainLiteral() && !OWL2Datatype.XSD_STRING.matches(node.getDatatype())) { write("^^"); write(node.getDatatype().getIRI()); } }
@Override public void visit(OWLLiteral node) { write("\""); write(EscapeUtils.escapeString(node.getLiteral())); write("\""); if (node.hasLang()) { write("@"); write(node.getLang()); } else if (!node.isRDFPlainLiteral() && !OWL2Datatype.XSD_STRING.matches(node.getDatatype())) { write("^^"); write(node.getDatatype().getIRI()); } }
@Override public void visit(OWLLiteral node) { write("\""); write(EscapeUtils.escapeString(node.getLiteral())); write("\""); if (node.hasLang()) { write("@"); write(node.getLang()); } else if (!node.isRDFPlainLiteral() && !OWL2Datatype.XSD_STRING.matches(node.getDatatype())) { write("^^"); write(node.getDatatype().getIRI()); } }
@Override public void visit(OWLLiteral node) { write("\""); write(EscapeUtils.escapeString(node.getLiteral())); write("\""); if (node.hasLang()) { write("@"); write(node.getLang()); } else if (!node.isRDFPlainLiteral() && !OWL2Datatype.XSD_STRING.matches(node.getDatatype())) { write("^^"); write(node.getDatatype().getIRI()); } }