public class PLDocParser extends Object
| Constructor and Description |
|---|
PLDocParser() |
PLDocParser(Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
static int |
copy(InputStream input,
OutputStream output) |
static int |
copy(InputStream input,
Writer output) |
static int |
copy(Reader input,
OutputStream output) |
static int |
copy(Reader input,
Writer output) |
static Object |
getDBObject(Connection connection,
int returnType,
String sqlStatement)
Helper method to confirm database working.
|
static Clob |
getResource(String path,
Clob resourceClob)
Helper method to provision and return Clob from PLDoc resource
|
static URIResolver |
getResourceResolver()
Helper method to return fixed URIResolver to alternative applications: this provides read access to internal PLDoc resources such as stylesheets.
|
static InputStream |
getResourceStream(String path)
Helper method to return InputStream from internal PLDoc resources such as stylesheets.
|
Settings |
getSettings() |
static void |
main(String[] args)
Perform ad hoc test using command line parameters or defaults if not supplied.
|
void |
parse(String schemaName,
String objectName,
String objectType,
Clob objectCode,
Clob parsedCode)
Parse object PLDoc into intermediate XML.
|
static void |
setResource(String path,
Clob resourceClob)
Helper method to copy PLDoc resource to provided Clob
|
void |
setSettings(Settings settings) |
public PLDocParser()
public PLDocParser(Settings settings)
public Settings getSettings()
public void setSettings(Settings settings)
public void parse(String schemaName, String objectName, String objectType, Clob objectCode, Clob parsedCode) throws Exception
schemaName - The name of the owner of the object to be parsedobjectName - The name of the object to be parsedobjectType - The type of the object to be parsedobjectCode - Object code to parsedparsedCode - Clob that parsed information will be written toException - Thrown if an error occurred and the user specified the halt on errors option.
All other throwables will be caught.public static URIResolver getResourceResolver()
public static InputStream getResourceStream(String path) throws IOException
path - name of internal resopurceIOException - on problem retrieving PLDoc resource.public static void setResource(String path, Clob resourceClob) throws IOException, SQLException
path - name of internal resopurceresourceClob - target database Clob.IOException - on problem retrieving PLDoc resource or copying to output.SQLException - on problem retrieving PLDoc resource.public static Clob getResource(String path, Clob resourceClob) throws IOException, SQLException
path - name of internal resopurceresourceClob - target database Clob.IOException - on problem retrieving PLDoc resource or copying to output.SQLException - on problem retrieving PLDoc resource.public static void main(String[] args) throws Exception
args - array of command-line parametersException - on any encountered errorpublic static int copy(InputStream input, OutputStream output) throws IOException
IOExceptionpublic static int copy(Reader input, OutputStream output) throws IOException
IOExceptionpublic static int copy(InputStream input, Writer output) throws IOException
IOExceptionpublic static int copy(Reader input, Writer output) throws IOException
IOExceptionpublic static Object getDBObject(Connection connection, int returnType, String sqlStatement) throws SQLException
connection - Database connectionreturnType - the required/expected return type java.sql.Types}sqlStatement - the SQl steatement to generate the daatabase objectSQLException - on database connection or access problemsCopyright © 2019. All rights reserved.