public class ParserConfig extends Object implements Serializable
RDFParser
configuration options.| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
log |
protected ConcurrentMap<ParserSetting<Object>,Object> |
settings
A map containing mappings from settings to their values.
|
| Constructor and Description |
|---|
ParserConfig()
Creates a ParserConfig object starting with default settings.
|
ParserConfig(boolean verifyData,
boolean stopAtFirstError,
boolean preserveBNodeIDs,
RDFParser.DatatypeHandling datatypeHandling)
Creates a ParserConfig object with the supplied config settings.
|
| Modifier and Type | Method and Description |
|---|---|
RDFParser.DatatypeHandling |
datatypeHandling() |
<T> T |
get(ParserSetting<T> setting)
Return the value for a given
ParserSetting or the default value if
it has not been set. |
boolean |
isPreserveBNodeIDs() |
<T> boolean |
isSet(ParserSetting<T> setting)
Checks for whether a
ParserSetting has been explicitly set by a
user. |
<T> void |
set(ParserSetting<T> setting,
T value)
Sets a
ParserSetting to have a new value. |
boolean |
stopAtFirstError() |
boolean |
verifyData() |
protected final ConcurrentMap<ParserSetting<Object>,Object> settings
protected final org.slf4j.Logger log
public ParserConfig()
public ParserConfig(boolean verifyData,
boolean stopAtFirstError,
boolean preserveBNodeIDs,
RDFParser.DatatypeHandling datatypeHandling)
public boolean verifyData()
BasicParserSettings.VERIFY_DATA setting.public boolean stopAtFirstError()
BasicParserSettings.STOP_AT_FIRST_ERROR
setting.public boolean isPreserveBNodeIDs()
BasicParserSettings.PRESERVE_BNODE_IDS
setting.public RDFParser.DatatypeHandling datatypeHandling()
BasicParserSettings.DATATYPE_HANDLING setting.public <T> T get(ParserSetting<T> setting)
ParserSetting or the default value if
it has not been set.setting - The ParserSetting to fetch a value for.public <T> void set(ParserSetting<T> setting, T value)
ParserSetting to have a new value. If the value is null,
the parser setting is removed and the default will be used instead.setting - The setting to set a new value for.value - The value for the parser setting, or null to reset the parser
setting to use the default value.public <T> boolean isSet(ParserSetting<T> setting)
ParserSetting has been explicitly set by a
user.setting - The setting to check for.Copyright © 2001-2013 Aduna. All Rights Reserved.