Search in sources :

Example 6 with JsonLdOptions

use of com.github.jsonldjava.core.JsonLdOptions in project stanbol by apache.

the class JsonLdSerializingProvider method activate.

@Activate
protected void activate(ComponentContext ctx) {
    opts = new JsonLdOptions();
    @SuppressWarnings("unchecked") Dictionary<String, Object> config = ctx.getProperties();
    //boolean properties
    opts.setUseRdfType(getState(config.get(PROP_USE_RDF_TYPE), false));
    opts.setUseNativeTypes(getState(config.get(PROP_USE_NATIVE_TYPES), false));
    prettyPrint = getState(config.get(PROP_PRETTY_PRINT), true);
    //parse the string mode
    Object value = config.get(PROP_MODE);
    mode = value == null ? null : value.toString();
}
Also used : JsonLdOptions(com.github.jsonldjava.core.JsonLdOptions) Activate(org.apache.felix.scr.annotations.Activate)

Aggregations

JsonLdOptions (com.github.jsonldjava.core.JsonLdOptions)6 RDFDataset (com.github.jsonldjava.core.RDFDataset)2 Map (java.util.Map)2 Model (org.apache.jena.rdf.model.Model)2 JsonLDWriteContext (org.apache.jena.riot.JsonLDWriteContext)2 JsonLdApi (com.github.jsonldjava.core.JsonLdApi)1 JsonLdError (com.github.jsonldjava.core.JsonLdError)1 JsonLdTripleCallback (com.github.jsonldjava.core.JsonLdTripleCallback)1 LinkedHashMap (java.util.LinkedHashMap)1 List (java.util.List)1 Activate (org.apache.felix.scr.annotations.Activate)1 JsonString (org.apache.jena.atlas.json.JsonString)1 BaseTest (org.apache.jena.atlas.junit.BaseTest)1 Node (org.apache.jena.graph.Node)1 Triple (org.apache.jena.graph.Triple)1 Resource (org.apache.jena.rdf.model.Resource)1 Util.isLangString (org.apache.jena.rdf.model.impl.Util.isLangString)1 Util.isSimpleString (org.apache.jena.rdf.model.impl.Util.isSimpleString)1 RDFFormat (org.apache.jena.riot.RDFFormat)1 PrefixMap (org.apache.jena.riot.system.PrefixMap)1