public class PatternRuleLoader extends org.xml.sax.helpers.DefaultHandler
PatternRules from an XML file.| Constructor and Description |
|---|
PatternRuleLoader() |
| Modifier and Type | Method and Description |
|---|---|
List<PatternRule> |
getRules(File file) |
List<PatternRule> |
getRules(InputStream is,
String filename) |
void |
setRelaxedMode(boolean relaxedMode)
If set to true, don't throw an exception if id or name is not set.
|
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warningpublic final List<PatternRule> getRules(File file) throws IOException
file - XML file with pattern rulesIOExceptionpublic void setRelaxedMode(boolean relaxedMode)
public final List<PatternRule> getRules(InputStream is, String filename) throws IOException
is - stream with the XML rulesfilename - used only for verbose exception message - should refer to where the stream comes fromIOException