public class ProgramCallDocument
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
java com.ibm.as400.data.ProgramCallDocument -serialize PCML document nameOptions:
.pcml.ser
(lowercase).
Modifier and Type | Field and Description |
---|---|
static int |
SERIALIZED
Constant indicating a serialized PCML or XPCML document is being streamed.
|
static int |
SOURCE_PCML
Constant indicating a source PCML document is being streamed.
|
static int |
SOURCE_XPCML
Constant indicating a source XPCML document is being streamed.
|
Constructor and Description |
---|
ProgramCallDocument()
Constructs a ProgramCallDocument object.
|
ProgramCallDocument(AS400 sys,
java.lang.String docName)
Constructs a ProgramCallDocument object.
|
ProgramCallDocument(AS400 sys,
java.lang.String docName,
java.lang.ClassLoader loader)
Constructs a ProgramCallDocument object.
|
ProgramCallDocument(AS400 sys,
java.lang.String docName,
java.lang.ClassLoader loader,
java.io.InputStream xsdStream)
Constructs a ProgramCallDocument object.
|
ProgramCallDocument(AS400 sys,
java.lang.String docName,
java.io.InputStream xsdStream)
Constructs a ProgramCallDocument object.
|
ProgramCallDocument(AS400 sys,
java.lang.String docName,
java.io.InputStream docStream,
java.lang.ClassLoader loader,
java.io.InputStream xsdStream,
int type)
Constructs a ProgramCallDocument object.
|
ProgramCallDocument(java.lang.String docName)
Constructs a ProgramCallDocument object.
|
ProgramCallDocument(java.lang.String docName,
java.lang.ClassLoader loader)
Constructs a ProgramCallDocument object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
callProgram(java.lang.String name)
Calls the named program.
|
java.lang.Object |
clone()
Clones the ProgramCallDocument and the objects contained in it.
|
static void |
condenseXPCML(java.io.InputStream fullStream,
java.io.OutputStream xsdStream,
java.io.OutputStream condensedStream,
java.lang.String xsdStreamName)
Transforms a fully specified XPCML stream to a more condensed XPCML stream
and an XSD stream representing the new type definitions created while condensing.
|
void |
generateXPCML(java.io.OutputStream outputStream)
Generates XPCML representing the data contained in the entire PCML node tree.
|
void |
generateXPCML(java.lang.String fileName)
Generates XPCML representing the data contained in the entire PCML node tree.
|
void |
generateXPCML(java.lang.String pgmName,
java.io.OutputStream outputStream)
Generates XPCML representing the data associated with the passed-in program name.
|
void |
generateXPCML(java.lang.String pgmName,
java.lang.String fileName)
Generates XPCML representing the data contained for the passed in program name.
|
Descriptor |
getDescriptor()
Returns a Descriptor for the current PCML document.
|
static Descriptor |
getDescriptor(java.lang.String docName)
Returns a Descriptor for the specified PCML document.
|
static Descriptor |
getDescriptor(java.lang.String docName,
java.lang.ClassLoader loader)
Returns a Descriptor for the specified PCML document.
|
static Descriptor |
getDescriptor(java.lang.String docName,
java.lang.ClassLoader loader,
java.io.InputStream xsdStream)
Returns a Descriptor for the specified XPCML document.
|
static Descriptor |
getDescriptor(java.lang.String docName,
java.io.InputStream xsdStream)
Returns a Descriptor for the specified XPCML document.
|
int |
getErrno(java.lang.String name)
Returns an "errno" value for the named service program element.
|
int |
getIntReturnValue(java.lang.String name)
Returns an int return value for the named service program element.
|
int |
getIntValue(java.lang.String name)
Returns an int value for the named element.
|
int |
getIntValue(java.lang.String name,
int[] indices)
Returns an int value for the named element given indices to the data element.
|
AS400Message[] |
getMessageList(java.lang.String name)
Returns the list of IBM i system messages returned from running the
program.
|
int |
getOutputsize(java.lang.String name)
Returns the number of bytes reserved for output for the named element.
|
int |
getOutputsize(java.lang.String name,
int[] indices)
Returns the number of bytes reserved for output for the named element and indices.
|
ProgramCall |
getProgramCall()
Returns the ProgramCall object that was used in the most recent invocation of
callProgram() . |
java.lang.String |
getStringValue(java.lang.String name)
Returns a String value for the named element.
|
java.lang.String |
getStringValue(java.lang.String name,
int type)
Returns a String value for the named element.
|
java.lang.String |
getStringValue(java.lang.String name,
int[] indices)
Returns a String value for the named element given indices to the data element.
|
java.lang.String |
getStringValue(java.lang.String name,
int[] indices,
int type)
Returns a String value for the named element given indices to the data element.
|
AS400 |
getSystem()
Gets the system on which programs are to be called.
|
boolean |
getThreadsafeOverride(java.lang.String program)
Gets the value of the override of the threadsafe attribute of a program element.
|
int |
getTimeout() |
java.lang.Object |
getValue(java.lang.String name)
Returns the Java object value for the named element.
|
java.lang.Object |
getValue(java.lang.String name,
int[] indices)
Returns the Java object value for the named element given indices to the data element.
|
java.lang.String |
getXsdName()
Returns the value of the XSD name to be used on the <xpcml> tag when
generating XPCML.
|
static void |
main(java.lang.String[] args)
Provides a command line interface to ProgramCallDocument.
|
void |
serialize()
Deprecated.
Use
serialize(File) instead. |
void |
serialize(java.io.File file)
Serializes the ProgramCallDocument to a file.
|
void |
serialize(java.io.OutputStream outputStream)
Serializes the ProgramCallDocument to a stream.
|
void |
setCharArrayValue(java.lang.String name,
char[] value) |
void |
setCharArrayValue(java.lang.String name,
char[] value,
int type) |
void |
setCharArrayValue(java.lang.String name,
int[] indices,
char[] value,
int type) |
void |
setDocument(java.lang.String docName)
Sets the PCML or XPCML document resource.
|
void |
setDocument(java.lang.String docName,
java.lang.ClassLoader loader)
Sets the PCML or XPCML document resource.
|
void |
setDocument(java.lang.String docName,
java.lang.ClassLoader loader,
java.io.InputStream xsdStream)
Sets the PCML or XPCML document resource.
|
void |
setDocument(java.lang.String docName,
java.io.InputStream xsdStream)
Sets the XPCML document resource.
|
void |
setIntValue(java.lang.String name,
int value)
Sets the Java object value for the named element using a int input.
|
void |
setIntValue(java.lang.String name,
int[] indices,
int value)
Sets the Java object value for the named element using an int input value
given indices to the data element.
|
void |
setPath(java.lang.String program,
java.lang.String path)
Allows for dynamically specifying the program path of the program to be called.
|
void |
setStringValue(java.lang.String name,
int[] indices,
java.lang.String value,
int type)
Sets the Java object value for the named element using a String input value
given indices to the data element.
|
void |
setStringValue(java.lang.String name,
java.lang.String value)
Sets the Java object value for the named element using a String input.
|
void |
setStringValue(java.lang.String name,
java.lang.String value,
int type)
Sets the Java object value for the named element using a String input.
|
void |
setSystem(AS400 system)
Sets the system on which to call programs.
|
void |
setThreadsafeOverride(java.lang.String program,
boolean threadsafe)
Allows the overriding of the threadsafe attribute of a program element.
|
void |
setTimeOut(int timeOut) |
void |
setValue(java.lang.String name,
int[] indices,
java.lang.Object value)
Sets the Java object value for the named element
given indices to the data element.
|
void |
setValue(java.lang.String name,
java.lang.Object value)
Sets the Java object value for the named element.
|
void |
setXsdName(java.lang.String xsdName)
Sets the XSD name that will appear in the generated <xpcml> tag from the generateXPCML() methods.
|
static void |
transformPCMLToXPCML(java.io.InputStream pcmlStream,
java.io.OutputStream xpcmlStream)
Transforms a PCML stream to its equivalent XPCML stream.
|
public static final int SERIALIZED
public static final int SOURCE_PCML
public static final int SOURCE_XPCML
public ProgramCallDocument(AS400 sys, java.lang.String docName) throws PcmlException
sys
- The system on which to run the program.docName
- The document resource name of the PCML document for the programs to be called.
All PCML-related file extensions are assumed to be lowercase (for example, .pcml or .pcml.ser).
The resource name can be a package qualified name. For example, "com.myCompany.myPackage.myPcml"PcmlException
- when the specified PCML document cannot be foundpublic ProgramCallDocument(AS400 sys, java.lang.String docName, java.io.InputStream xsdStream) throws PcmlException
sys
- The system on which to run the program.docName
- The document resource name of the PCML document for the programs to be called.
All PCML-related file extensions are assumed to be lowercase (for example, .pcml or .pcml.ser).xsdStream
- An input stream that contains XML schema definitions that extend XPCML.
The resource name can be a package qualified name. For example, "com.myCompany.myPackage.myPcml"PcmlException
- when the specified PCML document cannot be foundpublic ProgramCallDocument(AS400 sys, java.lang.String docName, java.lang.ClassLoader loader) throws PcmlException
sys
- The system on which to run the program.docName
- The document resource name of the PCML document for the programs to be called.
All PCML-related file extensions are assumed to be lowercase (for example, .pcml or .pcml.ser).
The resource name can be a package qualified name. For example, "com.myCompany.myPackage.myPcml"loader
- The ClassLoader that will be used when loading the specified document resource.PcmlException
- when the specified PCML document cannot be foundpublic ProgramCallDocument(AS400 sys, java.lang.String docName, java.lang.ClassLoader loader, java.io.InputStream xsdStream) throws PcmlException
sys
- The system on which to run the program.docName
- The document resource name of the PCML document for the programs to be called.
All PCML-related file extensions are assumed to be lowercase (for example, .pcml or .pcml.ser).loader
- The ClassLoader that will be used when loading the specified document resource.xsdStream
- An input stream that contains XML schema definitions that extend XPCML. This parameter can be null.
The resource name can be a package qualified name. For example, "com.myCompany.myPackage.myPcml"PcmlException
- when the specified PCML document cannot be foundpublic ProgramCallDocument(AS400 sys, java.lang.String docName, java.io.InputStream docStream, java.lang.ClassLoader loader, java.io.InputStream xsdStream, int type) throws PcmlException
sys
- The system on which to run the program.docName
- The document resource name of the PCML document for the programs to be called.
All PCML-related file extensions are assumed to be lowercase (for example, .pcml or .pcml.ser).docStream
- The InputStream from which to read the contents of the document.loader
- The ClassLoader that will be used when loading the DTD for PCML. This parameter can be null.xsdStream
- An input stream that contains XML schema definitions that extend XPCML
The resource name can be a package qualified name. For example, "com.myCompany.myPackage.myPcml". This parameter can be null.type
- The type of data contained in docStream. Possible values are:
SERIALIZED
- The docStream contains a serialized PCML or XPCML document.
SOURCE_PCML
- The docStream contains a PCML document.
SOURCE_XPCML
- The docStream contains an XPCML document.
PcmlException
- when the specified PCML document cannot be foundpublic ProgramCallDocument() throws PcmlException
setSystem()
and setDocument()
must be called prior to using the object.PcmlException
- when the specified PCML document cannot be foundpublic ProgramCallDocument(java.lang.String docName) throws PcmlException
setSystem()
must be called prior to using the object.
The PCML or XPCML document resource will be loaded from the classpath.
If the document is a PCML document, the classpath will first be searched for a serialized resource.
XPCML documents cannot be serialized.
If a serialized resource is not found, the classpath will be
searched for a PCML or XPCML source file.docName
- The document resource name of the PCML document for the programs to be called.
All PCML-related file extensions are assumed to be lowercase (for example, .pcml or .pcml.ser).
The resource name can be a package qualified name. For example, "com.myCompany.myPackage.myPcml"PcmlException
- when the specified PCML document cannot be foundpublic ProgramCallDocument(java.lang.String docName, java.lang.ClassLoader loader) throws XmlException
setSystem()
must be called prior to using the object.
The PCML or XPCML document resource will be loaded from the classpath of the specified ClassLoader.
If the document is a PCML document, the classpath will first be searched for a serialized resource.
XPCML documents cannot be serialized.
If a serialized resource is not found, the classpath will be
searched for a PCML or XPCML source file.docName
- The document resource name of the PCML document for the programs to be called.loader
- The ClassLoader that will be used when loading the specified document resource.XmlException
PcmlException
- when the specified PCML document cannot be foundpublic java.lang.Object clone()
setSystem()
and setDocument()
must be called prior to using the object.clone
in class java.lang.Object
public static void main(java.lang.String[] args)
args
- public boolean callProgram(java.lang.String name) throws PcmlException
name
- The name of the <program> element in the PCML document.PcmlException
- If an error occurs.public int getErrno(java.lang.String name) throws PcmlException
The named program element must be defined as a service program entrypoint
.
The value returned is the "errno" value resulting from the most recent
call to the program. If the program has not been called, zero is returned.
name
- The name of the <program> element in the PCML document.PcmlException
- If an error occurs.public static Descriptor getDescriptor(java.lang.String docName) throws PcmlException
docName
- The document resource name of the PCML document for which the Descriptor is returned.
The resource name can be a package qualified name. For example, "com.myCompany.myPackage.myPcml"PcmlException
- when the specified PCML document cannot be foundpublic static Descriptor getDescriptor(java.lang.String docName, java.io.InputStream xsdStream) throws PcmlException
docName
- The document resource name of the XPCML document for which the Descriptor is returned.
The resource name can be a package qualified name. For example, "com.myCompany.myPackage.myPcml"xsdStream
- An input stream that contains XML schema definitions that extend XPCMLPcmlException
- when the specified PCML document cannot be foundpublic static Descriptor getDescriptor(java.lang.String docName, java.lang.ClassLoader loader) throws PcmlException
docName
- The document resource name of the PCML document for which the Descriptor is returned.
The resource name can be a package qualified name. For example, "com.myCompany.myPackage.myPcml"loader
- The ClassLoader that will be used when loading the specified document resource.PcmlException
- when the specified PCML document cannot be foundpublic static Descriptor getDescriptor(java.lang.String docName, java.lang.ClassLoader loader, java.io.InputStream xsdStream) throws PcmlException
docName
- The document resource name of the PCML document for which the Descriptor is returned.
The resource name can be a package qualified name. For example, "com.myCompany.myPackage.myPcml"loader
- The ClassLoader that will be used when loading the specified document resource.xsdStream
- An input stream that contains XML schema definitions that extend XPCML.PcmlException
- when the specified PCML document cannot be foundpublic Descriptor getDescriptor()
public int getIntReturnValue(java.lang.String name) throws PcmlException
The named program element must be defined as a service program entrypoint
.
The value returned is the integer return value from the most recent
call to the program. If the program has not been called, zero is returned.
name
- The name of the <program> element in the PCML document.PcmlException
- If an error occurs.public int getIntValue(java.lang.String name) throws PcmlException
If the named element is String or a Number output value of a program, the value will be converted to an int.
name
- The name of the <data> element in the PCML document.PcmlException
- If an error occurs.public int getIntValue(java.lang.String name, int[] indices) throws PcmlException
If the named element is String or a Number output value of a program, the value will be converted to an int.
name
- The name of the <data> element in the PCML document.indices
- PcmlException
- If an error occurs.public ProgramCall getProgramCall()
callProgram()
.public java.lang.String getStringValue(java.lang.String name) throws PcmlException
If the named element is String or a Number output value of a program, the value will
be converted to a String.
The default bidi string type is assumed (BidiStringType.DEFAULT
).
name
- The name of the <data> element in the PCML document.PcmlException
- If an error occurs.public java.lang.String getStringValue(java.lang.String name, int type) throws PcmlException
This method is used when the string type cannot be determined until run-time. In those cases, the PCML document cannot be used to indicate the string type so this method is used to get the value using the string type that is specified.
If the named element is String or a Number output value of a program, the value will be converted to a String.
name
- The name of the <data> element in the PCML document.type
- The bidi string type, as defined by the CDRA (Character
Data Representation Architecture).PcmlException
- If an error occurs.BidiStringType
public java.lang.String getStringValue(java.lang.String name, int[] indices) throws PcmlException
BidiStringType.DEFAULT
).
If the named element is String or a Number output value of a program, the value will be converted to a String.
name
- The name of the <data> element in the PCML document.indices
- An array of indices for setting the value of an element in an array.PcmlException
- If an error occurs.public java.lang.String getStringValue(java.lang.String name, int[] indices, int type) throws PcmlException
This method is used when the string type cannot be determined until run-time. In those cases, the PCML document cannot be used to indicate the string type so this method is used to get the value using the string type that is specified.
If the named element is String or a Number output value of a program, the value will be converted to a String.
name
- The name of the <data> element in the PCML document.indices
- An array of indices for setting the value of an element in an array.type
- The bidi string type, as defined by the CDRA (Character
Data Representation Architecture).PcmlException
- If an error occurs.BidiStringType
public AS400Message[] getMessageList(java.lang.String name) throws PcmlException
name
- The name of the <program> element in the PCML document.PcmlException
- If an error occurs.public int getOutputsize(java.lang.String name) throws PcmlException
name
- The name of the <data> or <struct> element in the PCML document.PcmlException
- If an error occurs.public int getOutputsize(java.lang.String name, int[] indices) throws PcmlException
name
- The name of the <data> or <struct> element in the PCML document.indices
- An array of indices for accessing the output size of an element in an array.PcmlException
- If an error occurs.public java.lang.Object getValue(java.lang.String name) throws PcmlException
If the named element is an output value of a program, the value will be converted from IBM i system data to a Java Object.
The type of object returned depends on the description in the PCML document.
PCML Description | Object Returned |
---|---|
type=char | String |
type=byte | byte[] |
type=int | Short |
type=int | Integer |
type=int | Integer |
type=int | Long |
type=int | Long |
type=int | BigInteger |
type=packed | BigDecimal |
type=zoned | BigDecimal |
type=float | Float |
type=float | Double |
type=date | java.sql.Date |
type=time | java.sql.Time |
type=timestamp | java.sql.Timestamp |
name
- The name of the <data> element in the PCML document.PcmlException
- If an error occurs.public java.lang.Object getValue(java.lang.String name, int[] indices) throws PcmlException
If the named element is an output value of a program, the value will be converted from IBM i system data to a Java Object.
The type of object returned depends on the description in the PCML document.
PCML Description | Object Returned |
---|---|
type=char | String |
type=byte | byte[] |
type=int | Short |
type=int | Integer |
type=int | Integer |
type=int | Long |
type=int | Long |
type=int | BigInteger |
type=packed | BigDecimal |
type=zoned | BigDecimal |
type=float | Float |
type=float | Double |
type=date | java.sql.Date |
type=time | java.sql.Time |
type=timestamp | java.sql.Timestamp |
name
- The name of the <data> element in the PCML document.indices
- An array of indices for accessing the value of an element in an array.PcmlException
- If an error occurs.public AS400 getSystem()
setSystem(com.ibm.as400.access.AS400)
public void serialize() throws PcmlException
serialize(File)
instead.docName.pcml.serwhere docName.pcml.ser (lowercase) is the name of the document used to construct this object.
PcmlException
- If an error occurs.public void serialize(java.io.OutputStream outputStream) throws java.io.IOException, PcmlException
outputStream
- The output stream to which to serialize the object.java.io.IOException
- If an error occurs while writing to the stream.PcmlException
- If an error occurs while processing PCML.public void serialize(java.io.File file) throws java.io.IOException, XmlException
file
- The file to which to serialize the object.java.io.IOException
- If an error occurs while writing to the file.XmlException
- If an error occurs while processing RFML.public void setIntValue(java.lang.String name, int value) throws PcmlException
The named element must be able to be set using a Integer object.
name
- The name of the <data> element in the PCML document.value
- The int value for the named element.PcmlException
- If an error occurs.public void setIntValue(java.lang.String name, int[] indices, int value) throws PcmlException
The named element must be able to be set using a Integer object.
name
- The name of the <data> element in the PCML document.indices
- An array of indices for setting the value of an element in an array.value
- The int value for the named element.PcmlException
- If an error occurs.public void setStringValue(java.lang.String name, java.lang.String value) throws PcmlException
BidiStringType.DEFAULT
).name
- The name of the <data> element in the PCML document.value
- The string value for the named element.PcmlException
- If an error occurs.public void setStringValue(java.lang.String name, java.lang.String value, int type) throws PcmlException
This method is used when the string type cannot be determined until run-time. In those cases, the PCML document cannot be used to indicate the string type so this method is used to set the value and the string type of the input value.
name
- The name of the <data> element in the PCML document.value
- The string value for the named element.type
- The bidi string type, as defined by the CDRA (Character
Data Representation Architecture).PcmlException
- If an error occurs.BidiStringType
public void setStringValue(java.lang.String name, int[] indices, java.lang.String value, int type) throws PcmlException
This method is used when the string type cannot be determined until run-time. In those cases, the PCML document cannot be used to indicate the string type so this method is used to set the value and the string type of the input value.
name
- The name of the <data> element in the PCML document.indices
- An array of indices for setting the value of an element in an array.value
- The string value for the named element.type
- The bidi string type, as defined by the CDRA (Character
Data Representation Architecture).PcmlException
- If an error occurs.BidiStringType
public void setCharArrayValue(java.lang.String name, char[] value) throws PcmlException
PcmlException
public void setCharArrayValue(java.lang.String name, char[] value, int type) throws PcmlException
PcmlException
public void setCharArrayValue(java.lang.String name, int[] indices, char[] value, int type) throws PcmlException
PcmlException
public void setDocument(java.lang.String docName) throws PcmlException
docName
- The document resource name of the PCML document for the programs to be called.
The resource name can be a package qualified name. For example, "com.myCompany.myPackage.myPcml"PcmlException
- when the specified PCML document cannot be foundpublic void setDocument(java.lang.String docName, java.io.InputStream xsdStream) throws PcmlException
docName
- The document resource name of the PCML document for the programs to be called.
The resource name can be a package qualified name. For example, "com.myCompany.myPackage.myPcml"xsdStream
- An input stream that contains XML schema definitions that extend XPCMLPcmlException
- when the specified PCML document cannot be foundpublic void setDocument(java.lang.String docName, java.lang.ClassLoader loader) throws PcmlException
docName
- The document resource name of the PCML document for the programs to be called.
The resource name can be a package qualified name. For example, "com.myCompany.myPackage.myPcml"loader
- The ClassLoader that will be used when loading the specified document resource.PcmlException
- when the specified PCML document cannot be foundpublic void setDocument(java.lang.String docName, java.lang.ClassLoader loader, java.io.InputStream xsdStream) throws PcmlException
docName
- The document resource name of the PCML or XPCML document for the programs to be called.
The resource name can be a package qualified name. For example, "com.myCompany.myPackage.myPcml"loader
- The ClassLoader that will be used when loading the specified document resource.xsdStream
- An input stream that contains XML schema definitions that extend XPCMLPcmlException
- when the specified PCML document cannot be foundpublic void setSystem(AS400 system)
system
- The system on which to call programs.public void setValue(java.lang.String name, java.lang.Object value) throws PcmlException
If the input value provided is not an instance of the
correct Java class for the defined data type, it will be converted
to the correct Java class. For example, an element defined as "type=int length=2 precision=15
",
will be converted to a Java Short object. In this case the value specified must be an instance of Number or String.
If the named element is an input value to a program, the value will
be converted to IBM i system data when callProgram()
is called.
name
- The name of the <data> element in the PCML document.value
- The java object value for the named element. The type of Object passed must be
the correct type for the element definition or a String that can be converted to the correct type.PcmlException
- If an error occurs.public void setValue(java.lang.String name, int[] indices, java.lang.Object value) throws PcmlException
If the input value provided is not an instance of the
correct Java class for the defined data type, it will be converted
to the correct Java class. For example, an element defined as "type=int length=2 precision=15
",
will be converted to a Java Short object. In this case the value specified must be an instance of Number or String.
If the named element is an input value to a program, the value will
be converted to IBM i system data when callProgram()
is called.
name
- The name of the <data> element in the PCML document.indices
- An array of indices for setting the value of an element in an array.value
- The java object value for the named element. The type of Object passed must be
the correct type for the element definition or a String that can be converted to the correct type.PcmlException
- If an error occurs.public void setPath(java.lang.String program, java.lang.String path) throws PcmlException
program
- The name of the <program> element in the PCML document.path
- A String containing the path to the program object to be run on the system.PcmlException
- If an error occurs.setDocument(String)
,
ProgramCallDocument(AS400,String,InputStream,ClassLoader,InputStream,int)
public void setThreadsafeOverride(java.lang.String program, boolean threadsafe) throws PcmlException
program
- The name of the <program> element in the PCML document.threadsafe
- A boolean indicating whether the named program element should be considered
thread safe (true) or not (false).PcmlException
- If an error occurs.public boolean getThreadsafeOverride(java.lang.String program) throws PcmlException
program
- The name of the <program> element in the PCML document.PcmlException
- If an error occurs.public void generateXPCML(java.lang.String pgmName, java.io.OutputStream outputStream) throws java.io.IOException, XmlException
pgmName
- The program to generate XPCML foroutputStream
- The output stream to which to write the text.java.io.IOException
- If an error occurs while writing the data.XmlException
- If an error occurs while processing XPCML.public void generateXPCML(java.io.OutputStream outputStream) throws java.io.IOException, XmlException
outputStream
- The output stream to which to write the text.java.io.IOException
- If an error occurs while writing the data.XmlException
- If an error occurs while processing XPCML.public void generateXPCML(java.lang.String fileName) throws java.io.IOException, XmlException
fileName
- The pathname of the file to which to write the text.java.io.IOException
- If an error occurs while writing the data.XmlException
- If an error occurs while processing XPCML.public void generateXPCML(java.lang.String pgmName, java.lang.String fileName) throws java.io.IOException, XmlException
pgmName
- The program name to generate XPCML for.fileName
- The pathname of the file to which to write the text.java.io.IOException
- If an error occurs while writing the data.XmlException
- If an error occurs while processing XPCML.public void setXsdName(java.lang.String xsdName)
xsdName
- The XSD name to appear in the <xpcml> tag when XPCML is output using the
generateXPCML method.public java.lang.String getXsdName()
public static void transformPCMLToXPCML(java.io.InputStream pcmlStream, java.io.OutputStream xpcmlStream) throws java.io.IOException, PcmlException, javax.xml.transform.TransformerException, org.xml.sax.SAXException
pcmlStream
- The PCML input stream.xpcmlStream
- The output XPCML stream.java.io.IOException
- If an error occurs while writing the data.PcmlException
- If an error occurs while processing XPCML.javax.xml.transform.TransformerException
org.xml.sax.SAXException
public static void condenseXPCML(java.io.InputStream fullStream, java.io.OutputStream xsdStream, java.io.OutputStream condensedStream, java.lang.String xsdStreamName) throws java.io.IOException, PcmlException, javax.xml.transform.TransformerException, org.xml.sax.SAXException
fullStream
- The full XPCML input stream.xsdStream
- The output xsd stream.condensedStream
- The output condensed XPCML stream.xsdStreamName
- The name of the xsd stream ("name.xsd") that will be createdjava.io.IOException
- If an error occurs while writing the data.PcmlException
- If an error occurs while processing XPCML.javax.xml.transform.TransformerException
org.xml.sax.SAXException
public void setTimeOut(int timeOut)
public int getTimeout()