Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package org.semanticweb.owlapi.model.parameters;
import java.io.IOException;
import java.io.InputStream;
import java.util.EnumMap;
import java.util.Map;
import java.util.Properties;
import javax.annotation.Nullable;
import org.semanticweb.owlapi.model.ByName;
import org.semanticweb.owlapi.model.MissingImportHandlingStrategy;
import org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration.MissingOntologyHeaderStrategy;
import org.semanticweb.owlapi.model.PriorityCollectionSorting;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This enum handles default values and config file or system property
* overrides. The config file name is {@code owlapi.properties}; to enable, make
* sure the file is in the classpath. The property names are
* {@code "org.semanticweb.owlapi.model.parameters.ConfigurationOptions."+name()}
* , both in the properties file and in the system properties.
*/
public enum ConfigurationOptions {
//@formatter:off
/** True if http compression should be used. */
ACCEPT_HTTP_COMPRESSION (Boolean.TRUE),
/** Timeout for connections. */
CONNECTION_TIMEOUT (20000),
/** True if redirects should be followed across protocols. */
FOLLOW_REDIRECTS (Boolean.TRUE),
/** True if annotations should be loaded, false if skipped. */
LOAD_ANNOTATIONS (Boolean.TRUE),
/** Missing imports handling strategy. */
MISSING_IMPORT_HANDLING_STRATEGY (MissingImportHandlingStrategy.THROW_EXCEPTION),
/** Default missing ontology strategy. */
MISSING_ONTOLOGY_HEADER_STRATEGY (MissingOntologyHeaderStrategy.INCLUDE_GRAPH),
/** Flag to enable stack traces on parsing exceptions. */
REPORT_STACK_TRACES (Boolean.TRUE),
/** Number of retries to attempt when retrieving an ontology form a remote URL. Defaults to 5. */
RETRIES_TO_ATTEMPT (5),
/** True if strict parsing should be used. */
PARSE_WITH_STRICT_CONFIGURATION (Boolean.FALSE),
/** True if Dublin Core. */
TREAT_DUBLINCORE_AS_BUILTIN (Boolean.TRUE),
/** sort configuration for priority collections */
PRIORITY_COLLECTION_SORTING (PriorityCollectionSorting.ON_SET_INJECTION_ONLY),
// Save options
/** True if ids for blank nodes should always be written (axioms and anonymous individuals only). */
SAVE_IDS (Boolean.FALSE),
/** True if all anonymous individuals should have their ids remapped after parsing. */
REMAP_IDS (Boolean.TRUE),
/** True if entities should be used for namespace abbreviations. */
USE_NAMESPACE_ENTITIES (Boolean.FALSE),
/** True if indenting should be used when writing out a file. */
INDENTING (Boolean.TRUE),
/** Size of indentation between levels. Only used if indenting is set to true. */
INDENT_SIZE (4),
/** True if rdfs:label values are to be used as banners in text output. */
LABELS_AS_BANNER (Boolean.FALSE);
//@formatter:on
private static final String PREFIX = "org.semanticweb.owlapi.model.parameters.ConfigurationOptions.";
private Object defaultValue;
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigurationOptions.class);
private static final EnumMap owlapiProperties = loadProperties();
private static EnumMap loadProperties() {
EnumMap map = new EnumMap<>(ConfigurationOptions.class);
Properties props = new Properties();
try (InputStream stream = ConfigurationOptions.class.getResourceAsStream("/owlapi.properties")) {
if (stream != null) {
props.load(stream);
}
} catch (IOException e) {
LOGGER.error("Properties cannot be loaded", e);
}
for (Map.Entry