public class RuleContext
extends org.apache.commons.chain.impl.ContextBase
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Field and Description |
---|---|
static String |
CHECKSUM_MANIFEST_KEY
The key used to retrieve a hash map containing the checksum values from
a given checksum manifest.
|
static String |
CRAWLER_KEY
The key used to retrieve the crawler.
|
static String |
FILE_FILTERS
The key used to set file name filters.
|
static 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 String |
LISTENER_KEY
The key used to retrieve the definition listener from the
execution context.
|
static String |
LOCATION_VALIDATOR_KEY
The key used to retrieve the top-level validator for getting singleton utilities.
|
static String |
PARENT_TARGET_KEY
The key used to retrieve the parent target from the context.
|
static String |
RECURSIVE_VALIDATION
The key used to set whether to validate recursively.
|
static String |
REGISTRAR_KEY
The key used to retrieve the validation registrar from the execution
context.
|
static String |
RULE_KEY |
static String |
RULE_MANAGER_KEY
The key used to retrieve the rule manager from the context.
|
static 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 |
---|---|
Map<URL,String> |
getChecksumManifest() |
<T> T |
getContextValue(String key,
Class<T> clazz)
Gets a value from the context in a type-safe manner.
|
Crawler |
getCrawler() |
WildcardOSFilter |
getFileFilters() |
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.
|
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(String key,
T value)
Puts a value into the context in a type-safe manner.
|
void |
setChecksumManifest(Map<URL,String> manifest) |
void |
setCrawler(Crawler crawler) |
void |
setFileFilters(List<String> filters) |
void |
setFileFilters(WildcardOSFilter filter) |
void |
setForceLabelSchemaValidation(boolean force)
Sets whether to force schema and Schematron validation defined in a label.
|
void |
setParentTarget(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(URL target) |
void |
setTargetRegistrar(TargetRegistrar registrar) |
clear, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, values
clone, containsKey, size
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsKey, equals, hashCode, size
public static final String LOCATION_VALIDATOR_KEY
public static final String FORCE_LABEL_SCHEMA_VALIDATION
public static final String RECURSIVE_VALIDATION
public static final String FILE_FILTERS
public static final String TARGET_KEY
public static final String LISTENER_KEY
public static final String REGISTRAR_KEY
public static final String RULE_MANAGER_KEY
public static final String RULE_KEY
public static final String PARENT_TARGET_KEY
public static final String CRAWLER_KEY
public static final String CHECKSUM_MANIFEST_KEY
public <T> T getContextValue(String key, Class<T> clazz)
key
- the keyclazz
- the expected classpublic <T> void putContextValue(String key, T value)
key
- the keyvalue
- the valuepublic URL getTarget()
public void setTarget(URL target) throws MalformedURLException, 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 String getParentTarget()
public void setParentTarget(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(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)
Copyright © 2010–2017 Planetary Data System. All rights reserved.