public class RuleContext
extends org.apache.commons.chain.impl.ContextBase
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CATALOG_FILES
The key used to retrieve the catalog files.
|
static java.lang.String |
CATALOG_RESOLVER
The key used to retrieve the XMLCatalogResolver object.
|
static java.lang.String |
CHECK_DATA_KEY
The key used to indicate whether to disable data content validation.
|
static java.lang.String |
CHECKSUM_MANIFEST_KEY
The key used to retrieve a hash map containing the checksum values from
a given checksum manifest.
|
static java.lang.String |
CRAWLER_KEY
The key used to retrieve the crawler.
|
static java.lang.String |
FILE_FILTERS
The key used to set file name filters.
|
static java.lang.String |
FORCE_LABEL_SCHEMA_VALIDATION
The key used to indicate that declared schema and Schematron files in a label
should be validated before the label is validate.
|
static java.lang.String |
LISTENER_KEY
The key used to retrieve the definition listener from the
execution context.
|
static java.lang.String |
LOCATION_VALIDATOR_KEY
The key used to retrieve the top-level validator for getting singleton utilities.
|
static java.lang.String |
PARENT_TARGET_KEY
The key used to retrieve the parent target from the context.
|
static java.lang.String |
RECURSIVE_VALIDATION
The key used to set whether to validate recursively.
|
static java.lang.String |
REGISTRAR_KEY
The key used to retrieve the validation registrar from the execution
context.
|
static java.lang.String |
RULE_KEY |
static java.lang.String |
RULE_MANAGER_KEY
The key used to retrieve the rule manager from the context.
|
static java.lang.String |
TARGET_KEY
The key used to retrieve the current validation target from the
execution context.
|
Constructor and Description |
---|
RuleContext() |
Modifier and Type | Method and Description |
---|---|
XMLCatalogResolver |
getCatalogResolver() |
java.util.List<java.lang.String> |
getCatalogs() |
boolean |
getCheckData() |
java.util.Map<java.net.URL,java.lang.String> |
getChecksumManifest() |
<T> T |
getContextValue(java.lang.String key,
java.lang.Class<T> clazz)
Gets a value from the context in a type-safe manner.
|
Crawler |
getCrawler() |
WildcardOSFilter |
getFileFilters() |
java.lang.String |
getParentTarget()
Gets the parent target location.
|
ProblemListener |
getProblemListener() |
LocationValidator |
getRootValidator()
Gets the top-level validator for getting singleton utilities, such
as the label validator.
|
ValidationRule |
getRule() |
ValidationRuleManager |
getRuleManager()
Gets the rule manager used to find other rules to apply.
|
java.net.URL |
getTarget() |
TargetRegistrar |
getTargetRegistrar() |
boolean |
isForceLabelSchemaValidation()
Tests whether to force validation of schemas and Schematrons defined in a
label file.
|
boolean |
isRecursive() |
boolean |
isRootTarget()
Tests whether this is the root target for the validation.
|
<T> void |
putContextValue(java.lang.String key,
T value)
Puts a value into the context in a type-safe manner.
|
void |
setCatalogResolver(XMLCatalogResolver catalogResolver) |
void |
setCatalogs(java.util.List<java.lang.String> catalogs) |
void |
setCheckData(boolean flag) |
void |
setChecksumManifest(java.util.Map<java.net.URL,java.lang.String> manifest) |
void |
setCrawler(Crawler crawler) |
void |
setFileFilters(java.util.List<java.lang.String> filters) |
void |
setFileFilters(WildcardOSFilter filter) |
void |
setForceLabelSchemaValidation(boolean force)
Sets whether to force schema and Schematron validation defined in a label.
|
void |
setParentTarget(java.lang.String parentLocation)
Sets the parent target location.
|
void |
setProblemListener(ProblemListener listener) |
void |
setRecursive(boolean isRecursive) |
void |
setRootTarget(boolean flag)
Sets whether this is the root target for the validation.
|
void |
setRootValidator(LocationValidator validator)
Sets the top-level validator.
|
void |
setRule(ValidationRule rule) |
void |
setRuleManager(ValidationRuleManager ruleManager)
Sets the rule manager to use for finding new rules.
|
void |
setTarget(java.net.URL target) |
void |
setTargetRegistrar(TargetRegistrar registrar) |
clear, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll, size
public static final java.lang.String LOCATION_VALIDATOR_KEY
public static final java.lang.String FORCE_LABEL_SCHEMA_VALIDATION
public static final java.lang.String RECURSIVE_VALIDATION
public static final java.lang.String FILE_FILTERS
public static final java.lang.String TARGET_KEY
public static final java.lang.String LISTENER_KEY
public static final java.lang.String REGISTRAR_KEY
public static final java.lang.String RULE_MANAGER_KEY
public static final java.lang.String RULE_KEY
public static final java.lang.String PARENT_TARGET_KEY
public static final java.lang.String CRAWLER_KEY
public static final java.lang.String CHECKSUM_MANIFEST_KEY
public static final java.lang.String CATALOG_FILES
public static final java.lang.String CATALOG_RESOLVER
public static final java.lang.String CHECK_DATA_KEY
public <T> T getContextValue(java.lang.String key, java.lang.Class<T> clazz)
key
- the keyclazz
- the expected classpublic <T> void putContextValue(java.lang.String key, T value)
key
- the keyvalue
- the valuepublic java.net.URL getTarget()
public void setTarget(java.net.URL target) throws java.net.MalformedURLException, java.net.URISyntaxException
java.net.MalformedURLException
java.net.URISyntaxException
public ProblemListener getProblemListener()
public void setProblemListener(ProblemListener listener)
public TargetRegistrar getTargetRegistrar()
public void setTargetRegistrar(TargetRegistrar registrar)
public ValidationRuleManager getRuleManager()
public ValidationRule getRule()
public void setRuleManager(ValidationRuleManager ruleManager)
ruleManager
- the rule managerpublic void setRule(ValidationRule rule)
public java.lang.String getParentTarget()
public void setParentTarget(java.lang.String parentLocation)
parent
- the parent target locationpublic boolean isRootTarget()
public void setRootTarget(boolean flag)
flag
- true, if this context is for the root targetpublic LocationValidator getRootValidator()
public void setRootValidator(LocationValidator validator)
validator
- the top-level validatorpublic boolean isRecursive()
public void setRecursive(boolean isRecursive)
public WildcardOSFilter getFileFilters()
public void setFileFilters(java.util.List<java.lang.String> filters)
public void setFileFilters(WildcardOSFilter filter)
public boolean isForceLabelSchemaValidation()
public void setForceLabelSchemaValidation(boolean force)
force
- true, if declared schema and Schematron files should be validatedpublic Crawler getCrawler()
public void setCrawler(Crawler crawler)
public void setChecksumManifest(java.util.Map<java.net.URL,java.lang.String> manifest)
public java.util.Map<java.net.URL,java.lang.String> getChecksumManifest()
public void setCatalogs(java.util.List<java.lang.String> catalogs)
public java.util.List<java.lang.String> getCatalogs()
public void setCatalogResolver(XMLCatalogResolver catalogResolver)
public XMLCatalogResolver getCatalogResolver()
public boolean getCheckData()
public void setCheckData(boolean flag)
Copyright © 2010-2018 Planetary Data System. All Rights Reserved.