Skip to content

Commit

Permalink
Initial source
Browse files Browse the repository at this point in the history
  • Loading branch information
bthomps committed Jun 24, 2024
1 parent acff2b9 commit b1deafd
Show file tree
Hide file tree
Showing 12 changed files with 295 additions and 0 deletions.
118 changes: 118 additions & 0 deletions v13/src/TreeTransformApplication/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>TreeTransformApplication</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.ibm.etools.mft.applib.applibbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.applib.applibresourcevalidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.connector.policy.ui.PolicyBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.applib.mbprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.msg.validation.dfdl.mlibdfdlbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.flow.adapters.adapterbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.flow.sca.scabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.msg.validation.dfdl.mbprojectresourcesbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.esql.lang.esqllangbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.map.builder.mslmappingbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.flow.msgflowxsltbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.flow.msgflowbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.decision.service.ui.decisionservicerulebuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.pattern.capture.PatternBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.json.builder.JSONBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.restapi.ui.restApiDefinitionsBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.policy.ui.policybuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.msg.assembly.messageAssemblyBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.msg.validation.dfdl.dfdlqnamevalidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.bar.ext.barbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.mft.unittest.ui.TestCaseBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.ibm.etools.msgbroker.tooling.applicationNature</nature>
<nature>com.ibm.etools.msgbroker.tooling.messageBrokerProjectNature</nature>
</natures>
</projectDescription>
16 changes: 16 additions & 0 deletions v13/src/TreeTransformApplication/ModelJSON.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Issue",
"type": "object",
"properties": {
"Problem": {
"type": "object",
"properties": {
"Description": {
"type": "string"
}
}
}
},
"required": ["Problem"]
}
10 changes: 10 additions & 0 deletions v13/src/TreeTransformApplication/ModelXML.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Problem">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Description" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
28 changes: 28 additions & 0 deletions v13/src/TreeTransformApplication/TreeTransform.msgflow
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ComIbmTrace.msgnode="ComIbmTrace.msgnode" xmlns:ComIbmTreeTransform.msgnode="ComIbmTreeTransform.msgnode" xmlns:ComIbmWSInput.msgnode="ComIbmWSInput.msgnode" xmlns:ComIbmWSReply.msgnode="ComIbmWSReply.msgnode" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:eflow="http://www.ibm.com/wbi/2005/eflow" xmlns:utility="http://www.ibm.com/wbi/2005/eflow_utility" nsURI="TreeTransform.msgflow" nsPrefix="TreeTransform.msgflow">
<eClassifiers xmi:type="eflow:FCMComposite" name="FCMComposite_1" nodeLayoutStyle="RECTANGLE">
<eSuperTypes href="http://www.ibm.com/wbi/2005/eflow#//FCMBlock"/>
<translation xmi:type="utility:TranslatableString" key="TreeTransform" bundleName="TreeTransform" pluginId="TreeTransformApplication"/>
<colorGraphic16 xmi:type="utility:GIFFileGraphic" resourceName="platform:/plugin/TreeTransformApplication/icons/full/obj16/TreeTransform.gif"/>
<colorGraphic32 xmi:type="utility:GIFFileGraphic" resourceName="platform:/plugin/TreeTransformApplication/icons/full/obj30/TreeTransform.gif"/>
<composition>
<nodes xmi:type="ComIbmWSInput.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_1" location="16,50" URLSpecifier="/TreeTransform" messageDomainProperty="XMLNSC" validateTiming="immediate" validateMaster="contentAndValue">
<translation xmi:type="utility:ConstantString" string="HTTP /TreeTransform"/>
</nodes>
<nodes xmi:type="ComIbmWSReply.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_3" location="636,48">
<translation xmi:type="utility:ConstantString" string="HTTP Reply"/>
</nodes>
<nodes xmi:type="ComIbmTreeTransform.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_4" location="206,45" inputMessageDomainProperty="XMLNSC" messageDomainProperty="JSON" messageSetProperty="ModelJSON.json" outputMessageLocation="Context">
<translation xmi:type="utility:ConstantString" string="TreeTransform"/>
</nodes>
<nodes xmi:type="ComIbmTrace.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_5" location="407,48" destination="file" filePath="C:\temp\TreeTransform\Trace.txt" pattern="==================================================&#xD;&#xA;== The traditional Logical Tree structure is as follows ...&#xD;&#xA;==================================================&#xD;&#xA;${Root}&#xD;&#xA;==================================================&#xD;&#xA;== The Context Tree new with v13 is as follows ...&#xD;&#xA;==================================================&#xD;&#xA;${Context}">
<translation xmi:type="utility:ConstantString" string="Trace"/>
</nodes>
<connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_4" targetNode="FCMComposite_1_4" sourceNode="FCMComposite_1_1" sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.in"/>
<connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_6" targetNode="FCMComposite_1_5" sourceNode="FCMComposite_1_4" sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.in"/>
<connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_1" targetNode="FCMComposite_1_3" sourceNode="FCMComposite_1_5" sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.in"/>
</composition>
<propertyOrganizer/>
<stickyBoard/>
</eClassifiers>
</ecore:EPackage>
25 changes: 25 additions & 0 deletions v13/src/TreeTransformApplication/TreeTransformValidateJSON.msgflow
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ComIbmCompute.msgnode="ComIbmCompute.msgnode" xmlns:ComIbmWSInput.msgnode="ComIbmWSInput.msgnode" xmlns:ComIbmWSReply.msgnode="ComIbmWSReply.msgnode" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:eflow="http://www.ibm.com/wbi/2005/eflow" xmlns:utility="http://www.ibm.com/wbi/2005/eflow_utility" nsURI="TreeTransformValidateJSON.msgflow" nsPrefix="TreeTransformValidateJSON.msgflow">
<eClassifiers xmi:type="eflow:FCMComposite" name="FCMComposite_1" nodeLayoutStyle="RECTANGLE">
<eSuperTypes href="http://www.ibm.com/wbi/2005/eflow#//FCMBlock"/>
<translation xmi:type="utility:TranslatableString" key="TreeTransformValidateJSON" bundleName="TreeTransformValidateJSON" pluginId="TreeTransformerApplication"/>
<colorGraphic16 xmi:type="utility:GIFFileGraphic" resourceName="platform:/plugin/TreeTransformerApplication/icons/full/obj16/TreeTransformValidateJSON.gif"/>
<colorGraphic32 xmi:type="utility:GIFFileGraphic" resourceName="platform:/plugin/TreeTransformerApplication/icons/full/obj30/TreeTransformValidateJSON.gif"/>
<composition>
<nodes xmi:type="ComIbmWSInput.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_1" location="25,60" URLSpecifier="/ValidateJSON" messageDomainProperty="JSON" messageSetProperty="ModelJSON.json" validateTiming="immediate" validateMaster="contentAndValue">
<translation xmi:type="utility:ConstantString" string="HTTP /ValidateJSON"/>
</nodes>
<nodes xmi:type="ComIbmCompute.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_2" location="211,18" computeExpression="esql://routine/#TreeTransformerValidateJSON_Compute.Main">
<translation xmi:type="utility:ConstantString" string="Compute"/>
</nodes>
<nodes xmi:type="ComIbmWSReply.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_3" location="405,56">
<translation xmi:type="utility:ConstantString" string="HTTP Reply"/>
</nodes>
<connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_1" targetNode="FCMComposite_1_2" sourceNode="FCMComposite_1_1" sourceTerminalName="OutTerminal.failure" targetTerminalName="InTerminal.in"/>
<connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_2" targetNode="FCMComposite_1_3" sourceNode="FCMComposite_1_1" sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.in"/>
<connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_3" targetNode="FCMComposite_1_3" sourceNode="FCMComposite_1_2" sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.in"/>
</composition>
<propertyOrganizer/>
<stickyBoard/>
</eClassifiers>
</ecore:EPackage>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessagePool xmlns="http://wwww.ibm.com/iib/test/1.0.0">
<InputMessage timestamp="1718873511452" nodeId="FCMComposite_1_1" name="Valid JSON" id="1718873511452-411">
<plainText>%7B%22Problem%22%3A+%7B%22Description%22%3A%22This+is+a+short+summary+description%22%7D%7D</plainText>
</InputMessage>
<InputMessage timestamp="1718873433958" nodeId="FCMComposite_1_1" name="Invalid JSON" id="1718873433958-356">
<plainText>%7B%22ThisFieldIsNotInTheJSONSchema%22%3A+%7B%22Description%22%3A%22This+is+a+short+summary+description%22%7D%7D</plainText>
</InputMessage>
</MessagePool>
25 changes: 25 additions & 0 deletions v13/src/TreeTransformApplication/TreeTransformValidateXML.msgflow
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ComIbmCompute.msgnode="ComIbmCompute.msgnode" xmlns:ComIbmWSInput.msgnode="ComIbmWSInput.msgnode" xmlns:ComIbmWSReply.msgnode="ComIbmWSReply.msgnode" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:eflow="http://www.ibm.com/wbi/2005/eflow" xmlns:utility="http://www.ibm.com/wbi/2005/eflow_utility" nsURI="TreeTransformValidateXML.msgflow" nsPrefix="TreeTransformValidateXML.msgflow">
<eClassifiers xmi:type="eflow:FCMComposite" name="FCMComposite_1" nodeLayoutStyle="RECTANGLE">
<eSuperTypes href="http://www.ibm.com/wbi/2005/eflow#//FCMBlock"/>
<translation xmi:type="utility:TranslatableString" key="TreeTransformValidateXML" bundleName="TreeTransformValidateXML" pluginId="TreeTransformerApplication"/>
<colorGraphic16 xmi:type="utility:GIFFileGraphic" resourceName="platform:/plugin/TreeTransformerApplication/icons/full/obj16/TreeTransformValidateXML.gif"/>
<colorGraphic32 xmi:type="utility:GIFFileGraphic" resourceName="platform:/plugin/TreeTransformerApplication/icons/full/obj30/TreeTransformValidateXML.gif"/>
<composition>
<nodes xmi:type="ComIbmWSInput.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_1" location="102,75" URLSpecifier="/ValidateXML" messageDomainProperty="XMLNSC" validateTiming="immediate" validateMaster="contentAndValue">
<translation xmi:type="utility:ConstantString" string="HTTP /ValidateXML"/>
</nodes>
<nodes xmi:type="ComIbmWSReply.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_2" location="482,71">
<translation xmi:type="utility:ConstantString" string="HTTP Reply"/>
</nodes>
<nodes xmi:type="ComIbmCompute.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_3" location="288,33" computeExpression="esql://routine/#TreeTransformerValidateXML_Compute.Main">
<translation xmi:type="utility:ConstantString" string="Compute"/>
</nodes>
<connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_1" targetNode="FCMComposite_1_2" sourceNode="FCMComposite_1_1" sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.in"/>
<connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_2" targetNode="FCMComposite_1_3" sourceNode="FCMComposite_1_1" sourceTerminalName="OutTerminal.failure" targetTerminalName="InTerminal.in"/>
<connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_3" targetNode="FCMComposite_1_2" sourceNode="FCMComposite_1_3" sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.in"/>
</composition>
<propertyOrganizer/>
<stickyBoard/>
</eClassifiers>
</ecore:EPackage>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessagePool xmlns="http://wwww.ibm.com/iib/test/1.0.0">
<InputMessage timestamp="1718873856042" nodeId="FCMComposite_1_1" name="Invalid XML" id="1718873856042-647">
<plainText>%3CThisFieldIsNotInTheSchema%3E%0D%0A%3CDescription%3EThis+is+a+short+summary+description%3C%2FDescription%3E%0D%0A%3C%2FThisFieldIsNotInTheSchema%3E</plainText>
</InputMessage>
<InputMessage timestamp="1718873911043" nodeId="FCMComposite_1_1" name="Valid XML" id="1718873911043-718">
<plainText>%3CProblem%3E%0D%0A%3CDescription%3EThis+is+a+short+summary+description%3C%2FDescription%3E%0D%0A%3C%2FProblem%3E</plainText>
</InputMessage>
</MessagePool>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessagePool xmlns="http://wwww.ibm.com/iib/test/1.0.0">
<InputMessage timestamp="1718874372065" nodeId="FCMComposite_1_1" name="Input" id="1718874372065-780">
<plainText>%3CProblem%3E%0D%0A%3CDescription%3EBen+magical+new+description+2%3C%2FDescription%3E%0D%0A%3C%2FProblem%3E</plainText>
</InputMessage>
</MessagePool>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@


CREATE COMPUTE MODULE TreeTransformerValidateJSON_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
SET OutputRoot.JSON.Data.Message.Feedback = 'The input message failed JSON validation';
RETURN TRUE;
END;

CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER;
SET J = CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;

CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@


CREATE COMPUTE MODULE TreeTransformerValidateXML_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
SET OutputRoot.XMLNSC.Message.Feedback = 'The input message failed XML validation';
RETURN TRUE;
END;

CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER;
SET J = CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;

CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;
1 change: 1 addition & 0 deletions v13/src/TreeTransformApplication/application.descriptor
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:appDescriptor xmlns="http://com.ibm.etools.mft.descriptor.base" xmlns:ns2="http://com.ibm.etools.mft.descriptor.app"><references/></ns2:appDescriptor>

0 comments on commit b1deafd

Please sign in to comment.