Package org.daisy.braille.pef
Class PEFValidator
java.lang.Object
org.daisy.factory.AbstractFactory
org.daisy.braille.pef.PEFValidator
- All Implemented Interfaces:
Serializable,Comparable<Factory>,Factory,Validator
Validates PEF-documents against the official Relax NG schema. Optionally performes additional
checks, see the different modes.
- Author:
- Joel HÃ¥kansson
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines the modes available to the validator. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringKey for getFeature/setFeature, corresponding value should be aPEFValidator.Modevalue -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFeature(String key) Gets the value of a feature used by this FactorygetProperty(String key) Gets the value of a read-only property that applies to all objects returned by this Factory.Gets the report for the latest call to validatevoidsetFeature(String key, Object value) Sets a feature for new Objects returned by this FactorybooleanValidates the resource at the given URLMethods inherited from class org.daisy.factory.AbstractFactory
compareTo, getDescription, getDisplayName, getIdentifier, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.daisy.factory.Factory
getDescription, getDisplayName, getIdentifier
-
Field Details
-
FEATURE_MODE
Key for getFeature/setFeature, corresponding value should be aPEFValidator.Modevalue- See Also:
-
-
Constructor Details
-
PEFValidator
public PEFValidator()Creates a new PEFValidator
-
-
Method Details
-
validate
Description copied from interface:ValidatorValidates the resource at the given URL -
getReportStream
Description copied from interface:ValidatorGets the report for the latest call to validate- Specified by:
getReportStreamin interfaceValidator- Returns:
- returns an InputStream for the report
-
getFeature
Description copied from interface:FactoryGets the value of a feature used by this Factory- Specified by:
getFeaturein interfaceFactory- Parameters:
key- the key for the feature- Returns:
- returns the current value of the feature
-
getProperty
Description copied from interface:FactoryGets the value of a read-only property that applies to all objects returned by this Factory.- Specified by:
getPropertyin interfaceFactory- Parameters:
key- the name of the property to get- Returns:
- returns the value associated with this property or null if none is found
-
setFeature
Description copied from interface:FactorySets a feature for new Objects returned by this Factory- Specified by:
setFeaturein interfaceFactory- Parameters:
key- the key for the featurevalue- the value of the feature
-