/** * Called when a statement with literal value is added to the model. * * @param subject IRI of the subject resource * @param predicate IRI of the predicate resource * @param object literal object value * @param dataType the IRI of the literal's datatype (may be {@code null}) * @param reificationID if not {@code null}, contains IRI of the resource that will wold the * reified statement */ public void statementWithLiteralValue( @Nonnull String subject, @Nonnull String predicate, @Nonnull String object, @Nullable String dataType, @Nullable String reificationID) { consumer.statementWithLiteralValue(subject, predicate, object, language, dataType); if (reificationID != null) { consumer.statementWithResourceValue(reificationID, RDF_TYPE, RDF_STATEMENT); consumer.statementWithResourceValue(reificationID, RDF_SUBJECT, subject); consumer.statementWithResourceValue(reificationID, RDF_PREDICATE, predicate); consumer.statementWithLiteralValue(reificationID, RDF_OBJECT, object, language, dataType); } }
/** * Called when a statement with resource value is added to the model. * * @param subject IRI of the subject resource * @param predicate IRI of the predicate resource * @param object IRI of the object resource * @param reificationID if not {@code null}, contains IRI of the resource that will wold the * reified statement */ public void statementWithResourceValue( @Nonnull String subject, @Nonnull String predicate, @Nonnull String object, @Nullable String reificationID) { String remappedSubject = consumer.remapOnlyIfRemapped(subject); consumer.statementWithResourceValue(remappedSubject, predicate, object); if (reificationID != null) { consumer.statementWithResourceValue(reificationID, RDF_TYPE, RDF_STATEMENT); consumer.statementWithResourceValue(reificationID, RDF_SUBJECT, remappedSubject); consumer.statementWithResourceValue(reificationID, RDF_PREDICATE, predicate); consumer.statementWithResourceValue(reificationID, RDF_OBJECT, object); } }