Package ca.phon.phontalk
Class TalkbankValidator
java.lang.Object
ca.phon.phontalk.TalkbankValidator
Validates talkbank xml files.
The class looks for the schmea in the following locations:
./talkbank.xsd
./data/talkbank.xsd
http://www.talkbank.org/software/talkbank.xsd
Errors are automatically sent to PhonLogger.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the resource resolver based on the catalog resolver.boolean
Validatoe the given fileboolean
validate
(File file, ErrorHandler handler) boolean
boolean
validate
(Source src, ErrorHandler handler) Validate the given source.boolean
Validate the given DOM doc.boolean
validate
(Document doc, ErrorHandler handler)
-
Constructor Details
-
TalkbankValidator
public TalkbankValidator()Constructor
-
-
Method Details
-
getResourceResolver
Get the resource resolver based on the catalog resolver. -
validate
Validate the given DOM doc.- Throws:
jakarta.xml.bind.ValidationException
-
validate
public boolean validate(Document doc, ErrorHandler handler) throws jakarta.xml.bind.ValidationException - Throws:
jakarta.xml.bind.ValidationException
-
validate
Validatoe the given file- Throws:
jakarta.xml.bind.ValidationException
-
validate
public boolean validate(File file, ErrorHandler handler) throws jakarta.xml.bind.ValidationException - Throws:
jakarta.xml.bind.ValidationException
-
validate
- Throws:
jakarta.xml.bind.ValidationException
-
validate
public boolean validate(Source src, ErrorHandler handler) throws jakarta.xml.bind.ValidationException Validate the given source.- Throws:
jakarta.xml.bind.ValidationException
-