public class PatternRuleLoader extends DefaultHandler
PatternRule
s from an XML file.Constructor and Description |
---|
PatternRuleLoader() |
Modifier and Type | Method and Description |
---|---|
List<AbstractPatternRule> |
getRules(File file,
Language lang) |
List<AbstractPatternRule> |
getRules(InputStream is,
String filename,
Language lang) |
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, warning
public final List<AbstractPatternRule> getRules(File file, Language lang) throws IOException
file
- XML file with pattern rulesIOException
public void setRelaxedMode(boolean relaxedMode)
public final List<AbstractPatternRule> getRules(InputStream is, String filename, Language lang) throws IOException
is
- stream with the XML rulesfilename
- used only for verbose exception message - should refer to where the stream comes fromIOException