Example usage for org.apache.commons.rdf.api RDFSyntax JSONLD

List of usage examples for org.apache.commons.rdf.api RDFSyntax JSONLD

Introduction

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

Prototype

RDFSyntax JSONLD

To view the source code for org.apache.commons.rdf.api RDFSyntax JSONLD.

Click Source Link

Document

JSON-LD 1.0

Usage

From source file:org.trellisldp.io.JenaIOService.java

/**
 * Create a serialization service./*from   w ww  .j  a v  a  2s.  co  m*/
 *
 * @param namespaceService the namespace service
 * @param htmlSerializer the HTML serializer service
 * @param cache a cache for custom JSON-LD profile resolution
 * @param whitelist a whitelist of JSON-LD profiles
 * @param whitelistDomains a whitelist of JSON-LD profile domains
 */
public JenaIOService(final NamespaceService namespaceService, final RDFaWriterService htmlSerializer,
        final CacheService<String, String> cache, final Set<String> whitelist,
        final Set<String> whitelistDomains) {
    this.nsService = requireNonNull(namespaceService, "The NamespaceService may not be null!");
    this.cache = requireNonNull(cache, "The CacheService may not be null!");
    this.htmlSerializer = htmlSerializer;
    this.whitelist = whitelist;
    this.whitelistDomains = whitelistDomains;

    final List<RDFSyntax> reads = new ArrayList<>(asList(TURTLE, RDFSyntax.JSONLD, NTRIPLES));
    if (nonNull(htmlSerializer)) {
        reads.add(RDFA);
    }
    this.readable = unmodifiableList(reads);
    this.updatable = unmodifiableList(asList(SPARQL_UPDATE));
    this.writable = unmodifiableList(asList(TURTLE, RDFSyntax.JSONLD, NTRIPLES));
}