Example usage for org.apache.commons.rdf.api IRI getIRIString

List of usage examples for org.apache.commons.rdf.api IRI getIRIString

Introduction

In this page you can find the example usage for org.apache.commons.rdf.api IRI getIRIString.

Prototype

String getIRIString();

Source Link

Document

Return the IRI encoded as a native Unicode String.
The returned string must not include URL-encoding to escape non-ASCII characters.

Usage

From source file:org.trellisldp.triplestore.TriplestoreResourceService.java

@Override
public CompletionStage<Void> add(final IRI id, final Dataset dataset) {
    return runAsync(() -> {
        final IRI graphName = rdf.createIRI(id.getIRIString() + "?ext=audit");
        try (final Dataset data = rdf.createDataset()) {
            dataset.getGraph(PreferAudit).ifPresent(g -> g.stream()
                    .forEach(t -> data.add(graphName, t.getSubject(), t.getPredicate(), t.getObject())));
            executeWrite(rdfConnection, () -> rdfConnection.loadDataset(asJenaDataset(data)));
        } catch (final Exception ex) {
            throw new RuntimeTrellisException("Error storing audit dataset for " + id, ex);
        }/*from   w w  w  .j a v a  2s . c o  m*/
    });
}

From source file:org.trellisldp.webac.WebACService.java

private String getCacheKey(final IRI identifier, final IRI agent) {
    return join("||", identifier.getIRIString(), agent.getIRIString());
}

From source file:org.trellisldp.webac.WebACService.java

/**
 * Clean the identifier.//w  ww  . j a va2  s  . c o  m
 *
 * @param identifier the identifier
 * @return the cleaned identifier
 */
private static IRI cleanIdentifier(final IRI identifier) {
    return rdf.createIRI(cleanIdentifier(identifier.getIRIString()));
}