|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.interfaceware.chameleon.Engine
public abstract class Engine
This class handles Chameleon Engine objects.
Constructor Summary | |
---|---|
Engine()
Construct an Engine object. |
Method Summary | |
---|---|
int |
ackMessageIndex()
Get the index of the message selected by the user to be the ACKnowledgment message. |
void |
addLog(Log ALog)
Add the specified log listener to receive log events from the Engine. |
int |
buildNumber()
Get the build number of Chameleon. |
Config |
config()
Get the Config object that allows one to set and get delimiter characters. |
java.lang.String |
configName(int ConfigIndex)
Get the name of the configuration with the specified index. |
int |
countOfConfig()
Get the number of configurations in the VMD file. |
int |
countOfMessage()
Get the number of messages that are defined in the currently loaded VMD file. |
int |
countOfMessageIdentifier(int MessageIndex)
Get the count of identifiers for a given message. |
void |
createEmptyMessageTable(Table ATable,
int MessageIndex)
Create an empty message table with the specified message index. |
int |
currentConfigIndex()
Get the index of the current configuration. |
protected void |
errorEvent(java.lang.Exception Error,
java.lang.String Description)
Convert an error to a string and append the description. |
protected void |
finalize()
Finalizer that invokes the release method. |
java.lang.String |
generate(Table ATable,
int MessageIndex)
Get a message in string format by generating it from the table structure ATable
and the message at MessageIndex . |
java.lang.String |
generateAckFromMessage(java.lang.String Message)
Generate an ACKnowledgment message in an optimized manner. |
void |
generateSchema(java.lang.String Filename)
Generate a XML schema. |
int |
ignoreMessageIndex()
Get the index of the message selected by the user to be the default message. |
int |
inConfigIndex()
Get the index of the incoming configuration used for graphical transformation. |
void |
load(java.lang.String MappingFile)
Load the visual message definition (VMD) file MappingFile . |
Log |
log()
Get the log interface. |
int |
majorVersion()
Get the major version number of Chameleon. |
java.lang.String |
makeMessagePrintable(java.lang.String Message)
Get a message string in a printable format by appending a newline character '\n' after every carriage return character '\r'. |
java.lang.String |
messageIdentity(int MessageIndex,
int IdentityIndex)
Get the regular expression used to match a field in a message's identity list. |
java.lang.String |
messageName(int MessageIndex)
Get the name of the message at index MessageIndex . |
int |
minorVersion()
Get the minor version number of Chameleon. |
int |
outConfigIndex()
Get the index of the outgoing configuration used for graphical transformation. |
protected int |
parse(java.lang.String Flatwire,
Table ResultTable)
Call the native C DLL method to parse the specified flatwire string into a Table. |
void |
parseMessage(java.lang.String Flatwire,
Transport ATransport)
Parse flatwire messages into a table if stubcode is being used. |
void |
println(java.lang.String Line)
Print the string Line to the log output. |
void |
release()
Release the Engine object handle. |
void |
setCurrentConfigIndex(int NewIndex)
Set the index of the current configuration. |
void |
setPythonKeyValuePair(java.lang.String Key,
java.lang.String Value)
Set a key value pair in the Python global namespace. |
void |
setRejectBadSegmentGrammar(boolean Value)
Set the option to enforce strict segment grammar in a parsed message. |
java.lang.String |
transformMessage(java.lang.String InMessage,
int InConfigIndex,
int OutConfigIndex)
Convert a message from one format to another. |
java.lang.String |
translateMessageToXml(java.lang.String Flatwire)
Translate a HL7 message into XML. |
java.lang.String |
translateXmlToMessage(java.lang.String Xml)
Translate XML encoded HL7 into a HL7 message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Engine() throws ChameleonException
ChameleonException
Method Detail |
---|
public void release() throws ChameleonException
ChameleonException
protected void finalize() throws ChameleonException
finalize
in class java.lang.Object
ChameleonException
public void load(java.lang.String MappingFile) throws ChameleonException
MappingFile
.
This must be done before the Engine can be used.
Applications should load the VMD file as part of initialization since
loading may take a few seconds. Loading the VMD file every time a message
is encountered will result in very slow performance.
ChameleonException
public void parseMessage(java.lang.String Flatwire, Transport ATransport) throws ChameleonException
Transport
for more information),
a null object can be passed in for the Transport argument.
ChameleonException
public java.lang.String translateMessageToXml(java.lang.String Flatwire) throws ChameleonException
ChameleonException
public java.lang.String translateXmlToMessage(java.lang.String Xml) throws ChameleonException
ChameleonException
protected int parse(java.lang.String Flatwire, Table ResultTable) throws ChameleonException
ChameleonException
public void setRejectBadSegmentGrammar(boolean Value) throws ChameleonException
ChameleonException
public java.lang.String makeMessagePrintable(java.lang.String Message) throws ChameleonException
ChameleonException
public int countOfMessage() throws ChameleonException
messageName
offers an easy way to iterate through the messages.
ChameleonException
public int countOfMessageIdentifier(int MessageIndex) throws ChameleonException
messageIdentity
offers an easy way to iterate through each message to
get the regular expression used for matching for
each message.
ChameleonException
public java.lang.String messageIdentity(int MessageIndex, int IdentityIndex) throws ChameleonException
countOfMessageIdentifier
offers an easy way to iterate through each message to get the regular expressions used for matching.
ChameleonException
public java.lang.String messageName(int MessageIndex) throws ChameleonException
MessageIndex
.
Usage of this method with countOfMessage
offers
an easy was to iterate through the messages.
ChameleonException
public Config config() throws ChameleonException
ChameleonException
public java.lang.String generate(Table ATable, int MessageIndex) throws ChameleonException
ATable
and the message at MessageIndex
.
ChameleonException
public void createEmptyMessageTable(Table ATable, int MessageIndex) throws ChameleonException
ChameleonException
public Log log()
addLog(Log)
public void addLog(Log ALog)
log()
command in the VMD file will be output through this interface.
log()
public void println(java.lang.String Line)
Line
to the log output.
public java.lang.String transformMessage(java.lang.String InMessage, int InConfigIndex, int OutConfigIndex) throws ChameleonException
InConfigIndex
flavor and translate it to the OutConfigIndex
flavor. The method returns the transformed data.
ChameleonException
public int countOfConfig() throws ChameleonException
ChameleonException
public int currentConfigIndex() throws ChameleonException
ChameleonException
setCurrentConfigIndex(int)
public void setCurrentConfigIndex(int NewIndex) throws ChameleonException
ChameleonException
currentConfigIndex()
public int inConfigIndex() throws ChameleonException
ChameleonException
public int outConfigIndex() throws ChameleonException
ChameleonException
public java.lang.String configName(int ConfigIndex) throws ChameleonException
ChameleonException
protected void errorEvent(java.lang.Exception Error, java.lang.String Description)
public int majorVersion() throws ChameleonException
ChameleonException
public int minorVersion() throws ChameleonException
ChameleonException
public int buildNumber() throws ChameleonException
ChameleonException
public int ackMessageIndex() throws ChameleonException
ChameleonException
public int ignoreMessageIndex() throws ChameleonException
ChameleonException
public void generateSchema(java.lang.String Filename) throws ChameleonException
ChameleonException
public java.lang.String generateAckFromMessage(java.lang.String Message) throws ChameleonException
ChameleonException
public void setPythonKeyValuePair(java.lang.String Key, java.lang.String Value) throws ChameleonException
Key
in Python being assigned the
value Value
.
ChameleonException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |