public class IlrBOMVocabularyXMLReader
extends java.lang.Object
IlrBOMVocabularyXMLReader implements an XML reader that loads BOM
vocabularies represented as Vocx schema compliant XML documents.
Call readVocabulary() or readVocabularies() to create
one or more more vocabularies.
The readVocabularies methods create a set of vocabularies for
different locales associated to the same BOM.
Note: processing errors can be raised while reading the
XML documents. For more information, see reportError().
| Constructor and Description |
|---|
IlrBOMVocabularyXMLReader()
Creates a Vocabulary XML Reader.
|
| Modifier and Type | Method and Description |
|---|---|
IlrVocabulary[] |
readVocabularies(org.w3c.dom.Element[] roots)
Creates a set of vocabularies by reading the XML documents represented
by an array of DOM root nodes.
|
IlrVocabulary[] |
readVocabularies(java.io.Reader[] readers)
Creates a set of vocabularies by reading the XML documents represented by
the given readers.
|
IlrVocabulary |
readVocabulary(org.w3c.dom.Element root)
Creates a vocabulary by reading the XML document represented by the
given DOM root node.
|
IlrVocabulary |
readVocabulary(java.io.Reader reader)
Creates a Vocabulary by reading the XML document stored in a reader.
|
protected void |
reportError(java.lang.String errorKey,
java.lang.Object[] args)
Called when a error is encountered while processing the XML documents
used to create vocabularies.
|
public IlrBOMVocabularyXMLReader()
public IlrVocabulary readVocabulary(java.io.Reader reader)
reader - A java.io.Reader that holds the XML document.public IlrVocabulary readVocabulary(org.w3c.dom.Element root)
root - The Vocabulary DOM root node.public IlrVocabulary[] readVocabularies(java.io.Reader[] readers)
readers - An array of Reader objects.public IlrVocabulary[] readVocabularies(org.w3c.dom.Element[] roots)
roots - An array of Vocabulary DOM root nodes.protected void reportError(java.lang.String errorKey,
java.lang.Object[] args)
RuntimeException. The
message contained in the exception explains the cause of the error.
Override this method in order to process errors differently.
© Copyright IBM Corp. 1987, 2017