@Override public String convertToDatabaseColumn(IRI aIri) { if (aIri == null) { return null; } return aIri.stringValue(); }
@Override public boolean isRecognizedDatatype(IRI datatypeUri) { if (datatypeUri == null) { throw new NullPointerException("Datatype URI cannot be null"); } return datatypeUri.stringValue().startsWith("http://dbpedia.org/datatype/"); }
@Override public boolean isRecognizedDatatype(IRI datatypeUri) { if (datatypeUri == null) { throw new NullPointerException("Datatype URI cannot be null"); } return datatypeUri.stringValue().startsWith("http://dbpedia.org/datatype/"); }
public boolean acceptIRI(IRI uri) { if(uriRegexPattern == null) { return true; } return uriRegexPattern.matcher(uri.stringValue()).find(); }
@Override public boolean isRecognizedDatatype(IRI datatypeUri) { if (datatypeUri == null) { throw new NullPointerException("Datatype URI cannot be null"); } return datatypeUri.stringValue().startsWith(GEO.NAMESPACE); }
@Override public boolean isBaseProperty(String propertyIdentifier, KnowledgeBase aKB) { return propertyIdentifier.equals(aKB.getLabelIri().stringValue()) || propertyIdentifier .equals(aKB.getSubclassIri().stringValue()) || propertyIdentifier .equals(aKB.getDescriptionIri().stringValue()) || propertyIdentifier .equals(aKB.getTypeIri().stringValue()); }
@Override public boolean acceptsProperty(String aPropertyIdentifier, KnowledgeBase aKB) { return aPropertyIdentifier.equals(aKB.getTypeIri().stringValue()); } }
@Override public boolean acceptsProperty(String aPropertyIdentifier, KnowledgeBase aKB) { return aPropertyIdentifier.equals(aKB.getSubclassIri().stringValue()); } }
@Override public List<ValueType> getSupportedValueTypes() { return asList( new ValueType(XMLSchema.BOOLEAN.stringValue(), "Boolean", valueTypeSupportId)); }
@Override public List<ValueType> getSupportedValueTypes() { return asList(new ValueType(XMLSchema.DOUBLE.stringValue(), "Numeric", valueTypeSupportId)); }
@Override public boolean isBaseProperty(String propertyIdentifier, KnowledgeBase aKB) { return propertyIdentifier.equals(aKB.getLabelIri().stringValue()) || propertyIdentifier .equals(aKB.getSubclassIri().stringValue()) || propertyIdentifier .equals(aKB.getDescriptionIri().stringValue()) || propertyIdentifier .equals(aKB.getTypeIri().stringValue()); }
@Override public List<ValueType> getSupportedValueTypes() { return asList( new ValueType(XMLSchema.ANYURI.stringValue(), "KB Resource", valueTypeSupportId)); }
private SearchFunction getSearchFunctionInternal(final IRI searchFunction) throws QueryEvaluationException { SearchFunction sf = SEARCH_FUNCTION_MAP.get(searchFunction); if (sf != null) { return sf; } else { throw new QueryEvaluationException("Unknown Search Function: " + searchFunction.stringValue()); } }
public IRI rewrite(final IRI original) { if (null == original) { return null; } else { String s = original.stringValue(); return s.startsWith(externalBaseURI) ? vf.createIRI(s.replace(externalBaseURI, internalBaseURI)) : original; } } };
@Override public TupleFunction parse(IRI funcUri, TripleSource store) throws RDF4JException { return functionRegistry.get(funcUri.stringValue()).orElse(null); } }
public void receiveTriple(Resource s, IRI p, Value o, IRI g, ExtractionContext context) throws TripleHandlerException { // Suppress stylesheet triples. if(alwaysSuppressCSSTriples && p.stringValue().equals(vXHTML.stylesheet.stringValue())) { return; } if (isRDFaContext(context)) { blocker.unblockContext(context); } blocker.receiveTriple(s, p, o, g, context); }
@Override public boolean acceptsProperty(String aPropertyIdentifier, KnowledgeBase aKB) { return aPropertyIdentifier.equals(aKB.getLabelIri().stringValue()) || kbService .isSubpropertyLabel(aKB, aPropertyIdentifier); } }
private void addRelationForStringTypeAttribute( Model model, Resource subject, IRI predicate, String value) { if (predicate.stringValue().equals(KEYWORD)) { stream(value.split(",")) .map(String::trim) .forEach(keyword -> model.add(subject, predicate, valueFactory.createLiteral(keyword))); } else { model.add(subject, predicate, valueFactory.createLiteral(value)); } }
private String shorten(IRI iri) { if (shortenUris) { String localName = iri.getLocalName(); String prefix = getPrefix(iri.getNamespace()); return prefix + PREFIX_SEPARATOR + localName; } else { return iri.stringValue(); } }
static void registerSpinParsingTupleFunctions(SpinParser parser, TupleFunctionRegistry tupleFunctionRegistry) { if (!tupleFunctionRegistry.has(SPIN.CONSTRUCT_PROPERTY.stringValue())) { tupleFunctionRegistry.add(new ConstructTupleFunction(parser)); } if (!tupleFunctionRegistry.has(SPIN.SELECT_PROPERTY.stringValue())) { tupleFunctionRegistry.add(new SelectTupleFunction(parser)); } }