public class SchematronValidationService extends Object implements MetacardValidator, Describable, ReportingMetacardValidator
When this service is instantiated at deployment time to the OSGi container it goes through 3 different preprocessing stages on the Schematron schema file. (These steps are required by the ISO Schematron implementation)
When XML documents are ingested, this service will run the XSLT generated by stage 3 against the XML document, validating it against the "compiled" Schematron schema file.
This service is using the SVRL script, hence the output of the validation will be an SVRL-formatted XML document.
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_THREAD_POOL_SIZE |
| Constructor and Description |
|---|
SchematronValidationService() |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
Returns a description of the describable item.
|
String |
getId()
Returns the name, aka ID, of the describable item.
|
String |
getOrganization()
Returns the organization associated with the describable item.
|
String |
getTitle()
Returns the title of the describable item.
|
String |
getVersion()
Retrieve the version.
|
void |
init() |
void |
setId(String id) |
void |
setNamespace(String namespace) |
void |
setPriority(int priority) |
void |
setSchematronFileNames(List<String> schematronFileNames) |
void |
setSuppressWarnings(boolean suppressWarnings) |
void |
validate(Metacard metacard)
Validates a
Metacard |
Optional<MetacardValidationReport> |
validateMetacard(Metacard metacard)
Validates a
Metacard. |
public static final String DEFAULT_THREAD_POOL_SIZE
public void init()
throws SchematronInitializationException
public void setSuppressWarnings(boolean suppressWarnings)
public void setSchematronFileNames(List<String> schematronFileNames) throws SchematronInitializationException
public void setNamespace(String namespace)
public void setPriority(int priority)
public void validate(Metacard metacard) throws ValidationException
MetacardValidatorMetacardvalidate in interface MetacardValidatormetacard - Metacard to validateValidationException - if any validation error occurspublic String getVersion()
DescribablegetVersion in interface Describablepublic String getId()
Describablehtml for a MetacardTransformer that transforms Metacards to HTMLgetId in interface Describablepublic void setId(String id)
public String getTitle()
DescribablegetTitle in interface Describablepublic String getDescription()
DescribablegetDescription in interface Describablepublic String getOrganization()
DescribablegetOrganization in interface Describablepublic Optional<MetacardValidationReport> validateMetacard(Metacard metacard)
ReportingMetacardValidatorMetacard.validateMetacard in interface ReportingMetacardValidatormetacard - the Metacard to validate, cannot be nullOptional containing a MetacardValidationReport if there are
violations, or an empty Optional if there are no violationsThis work is licensed under a Creative Commons Attribution 4.0 International License.