All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.rdf4j.rio.helpers.JSONLDSettings Maven / Gradle / Ivy

/*******************************************************************************
 * Copyright (c) 2015 Eclipse RDF4J contributors, Aduna, and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Distribution License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 *******************************************************************************/
package org.eclipse.rdf4j.rio.helpers;

import org.eclipse.rdf4j.rio.RioSetting;

/**
 * Settings that can be passed to JSONLD Parsers and Writers.
 * 
 * @author Peter Ansell
 * @see JSONLD Data Structures
 */
public class JSONLDSettings {

	/**
	 * If set to true, the JSON-LD processor replaces arrays with just one element with that element during compaction.
	 * If set to false, all arrays will remain arrays even if they have just one element.
	 * 

* Defaults to true. *

* Can be overridden by setting system property {@code org.eclipse.rdf4j.rio.jsonld.compact_arrays}. * * @see JSONLD Data Structures */ public static final RioSetting COMPACT_ARRAYS = new BooleanRioSetting( "org.eclipse.rdf4j.rio.jsonld.compact_arrays", "Compact arrays", Boolean.TRUE); /** * If set to true, the JSON-LD processor is allowed to optimize the output of the * Compaction algorithm to produce * even compacter representations. *

* Defaults to false. *

* Can be overridden by setting system property {@code org.eclipse.rdf4j.rio.jsonld.optimize}. * * @see JSONLD Data Structures */ public static final RioSetting OPTIMIZE = new BooleanRioSetting("org.eclipse.rdf4j.rio.jsonld.optimize", "Optimize output", Boolean.FALSE); /** * If set to true, the JSON-LD processor will try to convert typed values to JSON native types instead of using the * expanded object form when converting from RDF. xsd:boolean values will be converted to true or false. xsd:integer * and xsd:double values will be converted to JSON numbers. *

* Defaults to false for RDF compatibility. *

* Can be overridden by setting system property {@code org.eclipse.rdf4j.rio.jsonld.use_native_types}. * * @see JSONLD Data Structures */ public static final RioSetting USE_NATIVE_TYPES = new BooleanRioSetting( "org.eclipse.rdf4j.rio.jsonld.use_native_types", "Use Native JSON Types", Boolean.FALSE); /** * If set to true, the JSON-LD processor will use the expanded rdf:type IRI as the property instead of @type when * converting from RDF. *

* Defaults to false. *

* Can be overridden by setting system property {@code org.eclipse.rdf4j.rio.jsonld.use_rdf_type}. * * @see JSONLD Data Structures */ public static final RioSetting USE_RDF_TYPE = new BooleanRioSetting( "org.eclipse.rdf4j.rio.jsonld.use_rdf_type", "Use RDF Type", Boolean.FALSE); /** * The {@link JSONLDMode} that the writer will use to reorganise the JSONLD document after it is created. *

* Defaults to {@link JSONLDMode#EXPAND} to provide maximum RDF compatibility. * * @see JSONLD Features */ public static final RioSetting JSONLD_MODE = new RioSettingImpl( "org.eclipse.rdf4j.rio.jsonld_mode", "JSONLD Mode", JSONLDMode.EXPAND); /** * If set to true, the JSON-LD processor will try to represent the JSON-LD object in a hierarchical view. *

* Default to false *

* Can be overridden by setting system property {@code org.eclipse.rdf4j.rio.jsonld.hierarchical_view}. */ public static final RioSetting HIERARCHICAL_VIEW = new BooleanRioSetting( "org.eclipse.rdf4j.rio.jsonld.hierarchical_view", "Hierarchical representation of the JSON", Boolean.FALSE); /** * Private default constructor. */ private JSONLDSettings() { } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy