public class DmcUncheckedOIFParser extends Object
Object Instance Format is a text-based format that allows for the capture of just about any type of data. The kinds of objects that can be represented depend on schemas that are defined as part of a Dark Matter Schema (DMS).
At this level of parsing, no real error checking is performed - that will be taken care of by the object handler that understands the specifics of the schema that should be followed by the objects in the file.
parseFile(java.lang.String)| Constructor and Description |
|---|
DmcUncheckedOIFParser(DmcUncheckedOIFHandlerIF objHandler)
Creates a new Object Instance Format parser.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPreserveNewlinesAttribute(String an) |
void |
allowedErrors(int i)
Allows you to set the number of errors that you're willing to ignore during
the parsing.
|
void |
dropLineContinuations()
The OIF format uses the idea of continuing an attribute value across multiple lines
by starting subsequent lines with a space.
|
void |
parseFile(String fileName)
Parses the specified file and sends the objects to the object handler specified in
the constructor.
|
void |
parseFile(String fileName,
boolean isResource)
Parses the specified file and sends the objects to the object handler specified in
the constructor.
|
public DmcUncheckedOIFParser(DmcUncheckedOIFHandlerIF objHandler)
public void addPreserveNewlinesAttribute(String an)
public void dropLineContinuations()
public void allowedErrors(int i)
The parsing will always stop if we encounter a FATAL error (as reflected in the ResultSet).
public void parseFile(String fileName) throws ResultException, DmcValueException, DmcRuleExceptionSet, DmcNameClashException
fileName - The file to be parsed.ResultException, - DmcValueExceptionDmcRuleExceptionSetDmcNameClashExceptionResultExceptionDmcValueExceptionpublic void parseFile(String fileName, boolean isResource) throws ResultException, DmcValueException, DmcRuleExceptionSet, DmcNameClashException
fileName - The file to be parsed.isResource - A flag to indicate if the file name refers to a resource e.g. in a JAR. If so,
we have to approach the opening of the file differently.ResultException, - DmcValueExceptionDmcRuleExceptionSetDmcNameClashExceptionResultExceptionDmcValueExceptionCopyright © 2023. All rights reserved.