@Override public boolean verifyLanguage(String literalValue, String languageTag) throws LiteralUtilException { Objects.requireNonNull(languageTag, "Language tag cannot be null"); Objects.requireNonNull(literalValue, "Literal value cannot be null"); if (isRecognizedLanguage(languageTag)) { // Language tag syntax already checked in isRecognizedLanguage return true; } throw new LiteralUtilException("Could not verify BCP47 language tag"); }
reportError( "'" + label + "' did not have a valid value for language " + lang + ": " + e.getMessage() + " and could not be normalised", lineNo, columnNo, BasicParserSettings.NORMALIZE_LANGUAGE_TAGS, parserConfig, errListener); reportError( "'" + label + "' is not a valid value for datatype " + datatype + ": " + e.getMessage() + " and could not be normalised", lineNo, columnNo, BasicParserSettings.NORMALIZE_DATATYPE_VALUES, parserConfig, errListener);
reportError( "'" + label + "' did not have a valid value for language " + lang + ": " + e.getMessage() + " and could not be normalised", lineNo, columnNo, BasicParserSettings.NORMALIZE_LANGUAGE_TAGS, parserConfig, errListener); reportError( "'" + label + "' is not a valid value for datatype " + datatype + ": " + e.getMessage() + " and could not be normalised", lineNo, columnNo, BasicParserSettings.NORMALIZE_DATATYPE_VALUES, parserConfig, errListener);
@Override public boolean verifyDatatype(String literalValue, IRI datatypeUri) throws LiteralUtilException { if (isRecognizedDatatype(datatypeUri)) { if (literalValue == null) { throw new NullPointerException("Literal value cannot be null"); } // TODO: Implement verification return true; } throw new LiteralUtilException("Could not verify RDF builtin literal"); }
reportError( "'" + label + "' did not have a valid value for language " + lang + ": " + e.getMessage() + " and could not be normalised", lineNo, columnNo, BasicParserSettings.NORMALIZE_LANGUAGE_TAGS, parserConfig, errListener); reportError( "'" + label + "' is not a valid value for datatype " + datatype + ": " + e.getMessage() + " and could not be normalised", lineNo, columnNo, BasicParserSettings.NORMALIZE_DATATYPE_VALUES, parserConfig, errListener);
@Override public boolean verifyDatatype(String literalValue, IRI datatypeUri) throws LiteralUtilException { if (isRecognizedDatatype(datatypeUri)) { if (literalValue == null) { throw new NullPointerException("Literal value cannot be null"); } // TODO: Implement verification return true; } throw new LiteralUtilException("Could not verify DBPedia literal"); }
@Override public boolean verifyLanguage(String literalValue, String languageTag) throws LiteralUtilException { Objects.requireNonNull(languageTag, "Language tag cannot be null"); Objects.requireNonNull(literalValue, "Literal value cannot be null"); if (isRecognizedLanguage(languageTag)) { // Language tag syntax already checked in isRecognizedLanguage return true; } throw new LiteralUtilException("Could not verify BCP47 language tag"); }
@Override public boolean verifyLanguage(String literalValue, String languageTag) throws LiteralUtilException { Objects.requireNonNull(languageTag, "Language tag cannot be null"); Objects.requireNonNull(literalValue, "Literal value cannot be null"); if (isRecognizedLanguage(languageTag)) { // Language tag syntax already checked in isRecognizedLanguage return true; } throw new LiteralUtilException("Could not verify RFC3066 language tag"); }
@Override public boolean verifyDatatype(String literalValue, IRI datatypeUri) throws LiteralUtilException { if (isRecognizedDatatype(datatypeUri)) { if (literalValue == null) { throw new NullPointerException("Literal value cannot be null"); } // TODO: Implement verification return true; } throw new LiteralUtilException("Could not verify RDF builtin literal"); }
@Override public boolean verifyDatatype(String literalValue, IRI datatypeUri) throws LiteralUtilException { if (isRecognizedDatatype(datatypeUri)) { if (literalValue == null) { throw new NullPointerException("Literal value cannot be null"); } // TODO: Implement verification return true; } throw new LiteralUtilException("Could not verify DBPedia literal"); }
@Override public boolean verifyDatatype(String literalValue, IRI datatypeUri) throws LiteralUtilException { if (isRecognizedDatatype(datatypeUri)) { if (literalValue == null) { throw new NullPointerException("Literal value cannot be null"); } // TODO: Implement verification return true; } throw new LiteralUtilException("Could not verify DBPedia literal"); }
@Override public boolean verifyLanguage(String literalValue, String languageTag) throws LiteralUtilException { Objects.requireNonNull(languageTag, "Language tag cannot be null"); Objects.requireNonNull(literalValue, "Literal value cannot be null"); if (isRecognizedLanguage(languageTag)) { // Language tag syntax already checked in isRecognizedLanguage return true; } throw new LiteralUtilException("Could not verify RFC3066 language tag"); }
@Override public boolean verifyDatatype(String literalValue, IRI datatypeUri) throws LiteralUtilException { if (isRecognizedDatatype(datatypeUri)) { if (literalValue == null) { throw new NullPointerException("Literal value cannot be null"); } // TODO: Implement verification return true; } throw new LiteralUtilException("Could not verify DBPedia literal"); }
@Override public boolean verifyDatatype(String literalValue, IRI datatypeUri) throws LiteralUtilException { if (isRecognizedDatatype(datatypeUri)) { if (literalValue == null) { throw new NullPointerException("Literal value cannot be null"); } // TODO: Implement verification return true; } throw new LiteralUtilException("Could not verify DBPedia literal"); }
@Override public boolean verifyDatatype(String literalValue, IRI datatypeUri) throws LiteralUtilException { if (isRecognizedDatatype(datatypeUri)) { if (literalValue == null) { throw new NullPointerException("Literal value cannot be null"); } // TODO: Implement verification return true; } throw new LiteralUtilException("Could not verify DBPedia literal"); }
@Override public boolean verifyDatatype(String literalValue, IRI datatypeUri) throws LiteralUtilException { if (isRecognizedDatatype(datatypeUri)) { if (literalValue == null) { throw new NullPointerException("Literal value cannot be null"); } // TODO: Implement verification return true; } throw new LiteralUtilException("Could not verify RDF builtin literal"); }
@Override public Literal normalizeLanguage(String literalValue, String languageTag, ValueFactory valueFactory) throws LiteralUtilException { Objects.requireNonNull(languageTag, "Language tag cannot be null"); Objects.requireNonNull(literalValue, "Literal value cannot be null"); if (isRecognizedLanguage(languageTag)) { return valueFactory.createLiteral(literalValue, languageTag.toLowerCase().intern()); } throw new LiteralUtilException("Could not normalize RFC3066 language tag"); }
@Override public Literal normalizeLanguage(String literalValue, String languageTag, ValueFactory valueFactory) throws LiteralUtilException { Objects.requireNonNull(languageTag, "Language tag cannot be null"); Objects.requireNonNull(literalValue, "Literal value cannot be null"); if (isRecognizedLanguage(languageTag)) { return valueFactory.createLiteral(literalValue, languageTag.toLowerCase().intern()); } throw new LiteralUtilException("Could not normalize RFC3066 language tag"); }
@Override public Literal normalizeDatatype(String literalValue, IRI datatypeUri, ValueFactory valueFactory) throws LiteralUtilException { if (isRecognizedDatatype(datatypeUri)) { if (literalValue == null) { throw new NullPointerException("Literal value cannot be null"); } try { // TODO: Implement normalisation return valueFactory.createLiteral(literalValue, datatypeUri); } catch (IllegalArgumentException e) { throw new LiteralUtilException("Could not normalise RDF vocabulary defined literal", e); } } throw new LiteralUtilException("Could not normalise RDF vocabulary defined literal"); }
@Override public Literal normalizeDatatype(String literalValue, IRI datatypeUri, ValueFactory valueFactory) throws LiteralUtilException { if (isRecognizedDatatype(datatypeUri)) { if (literalValue == null) { throw new NullPointerException("Literal value cannot be null"); } try { // TODO: Implement normalisation return valueFactory.createLiteral(literalValue, datatypeUri); } catch (IllegalArgumentException e) { throw new LiteralUtilException("Could not normalise RDF vocabulary defined literal", e); } } throw new LiteralUtilException("Could not normalise RDF vocabulary defined literal"); }