/** * @param arg datatype * @return builder */ public BuilderLiteral withDatatype(OWL2Datatype arg) { return withDatatype(df.getOWLDatatype(arg.getIRI())); }
/** * @param arg datatype * @return builder */ public BuilderLiteral withDatatype(OWL2Datatype arg) { return withDatatype(df.getOWLDatatype(arg.getIRI())); }
/** * @param arg datatype * @return builder */ public BuilderLiteral withDatatype(OWL2Datatype arg) { return withDatatype(df.getOWLDatatype(arg.getIRI())); }
/** * @param arg * datatype * @return builder */ public BuilderLiteral withDatatype(OWL2Datatype arg) { return withDatatype(df.getOWLDatatype(arg.getIRI())); }
@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); } }
/** * Builder initialized from an existing object. * * @param expected the existing object * @param df data factory */ public BuilderLiteral(OWLLiteral expected, OWLDataFactory df) { this(df); if (expected.hasLang()) { withLanguage(expected.getLang()); } else { withDatatype(expected.getDatatype()); } if (expected.isBoolean()) { withValue(expected.parseBoolean()); } else if (expected.isDouble()) { withValue(expected.parseDouble()); } else if (expected.isFloat()) { withValue(expected.parseFloat()); } else if (expected.isInteger()) { withValue(expected.parseInteger()); } else { withLiteralForm(expected.getLiteral()); } }
/** * Builder initialized from an existing object. * * @param expected the existing object * @param df data factory */ public BuilderLiteral(OWLLiteral expected, OWLDataFactory df) { this(df); if (expected.hasLang()) { withLanguage(expected.getLang()); } else { withDatatype(expected.getDatatype()); } if (expected.isBoolean()) { withValue(expected.parseBoolean()); } else if (expected.isDouble()) { withValue(expected.parseDouble()); } else if (expected.isFloat()) { withValue(expected.parseFloat()); } else if (expected.isInteger()) { withValue(expected.parseInteger()); } else { withLiteralForm(expected.getLiteral()); } }
/** * Builder initialized from an existing object. * * @param expected the existing object * @param df data factory */ public BuilderLiteral(OWLLiteral expected, OWLDataFactory df) { this(df); if (expected.hasLang()) { withLanguage(expected.getLang()); } else { withDatatype(expected.getDatatype()); } if (expected.isBoolean()) { withValue(expected.parseBoolean()); } else if (expected.isDouble()) { withValue(expected.parseDouble()); } else if (expected.isFloat()) { withValue(expected.parseFloat()); } else if (expected.isInteger()) { withValue(expected.parseInteger()); } else { withLiteralForm(expected.getLiteral()); } }
/** * Builder initialized from an existing object. * * @param expected * the existing object * @param df * data factory */ public BuilderLiteral(OWLLiteral expected, OWLDataFactory df) { this(df); if (expected.hasLang()) { withLanguage(expected.getLang()); } else { withDatatype(expected.getDatatype()); } if (expected.isBoolean()) { withValue(expected.parseBoolean()); } else if (expected.isDouble()) { withValue(expected.parseDouble()); } else if (expected.isFloat()) { withValue(expected.parseFloat()); } else if (expected.isInteger()) { withValue(expected.parseInteger()); } else { withLiteralForm(expected.getLiteral()); } }