Compare commits

..

3 Commits

Author SHA1 Message Date
Jenkins Continuous Build server
acb526c40d Set version to 8.0.2 SNAPSHOT 2021-10-25 09:59:57 +02:00
jiezhang-tlnd
4294ecd024 update text (#6814) (#6817) 2021-10-25 14:37:28 +08:00
Jenkins Continuous Build server
1d2d17d71d Set version to 8.0.1 2021-10-21 16:11:20 +02:00
7636 changed files with 155487 additions and 30259 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="org.talend.designer.feature" label="Designer Feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
<feature id="org.talend.designer.feature" label="Designer Feature" version="8.0.1" provider-name=".Talend SA.">
<description url="http://www.talend.com/online/featuresdescription.html#designer-feature">Complete description about this feature at http://www.talend.com/online/featuresdescription.html#designer-feature</description>
<copyright url="http://www.talend.com/online/copyright.txt">Copyright Talend 2006, 2007</copyright>
<license>The licence are describe in branding feature</license>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.fragment.jars.di.feature"
label="Fragment Jars in DI"
version="8.8.8.qualifier">
version="8.0.1">
<description url="http://www.example.com/description">
[Enter Feature Description here.]

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.fragment.jars.di.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.gmf.feature"
label="Gmf"
version="8.8.8.qualifier">
version="8.0.1">
<description url="http://www.example.com/description">
GMF

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.gmf.feature</artifactId>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="org.talend.rcp.branding.tos.feature" label="Tos branding feature" version="8.8.8.qualifier" provider-name=".Talend SA." plugin="org.talend.rcp.branding.tos">
<feature id="org.talend.rcp.branding.tos.feature" label="Tos branding feature" version="8.0.1" provider-name=".Talend SA." plugin="org.talend.rcp.branding.tos">
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license>[Enter License Description here.]</license>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.rcp.branding.tos.feature</artifactId>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="org.talend.rcp.branding.tos.test.feature" label="Test feature for TOS" version="8.8.8.qualifier">
<feature id="org.talend.rcp.branding.tos.test.feature" label="Test feature for TOS" version="8.0.1">
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license url="http://www.example.com/license">[Enter License Description here.]</license>
@@ -48,7 +48,6 @@
<plugin id="org.talend.repository.localprovider.test" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.repository.metadata.test" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.repository.test" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.sqlbuilder.test" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.repository.view.di.test" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.repository.view.test" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/>
<plugin id="org.talend.testutils" download-size="0" install-size="0" version="0.0.0" unpack="false"/>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.rcp.branding.tos.test.feature</artifactId>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="org.talend.repository.feature" label="Repository Feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
<feature id="org.talend.repository.feature" label="Repository Feature" version="8.0.1" provider-name=".Talend SA.">
<description url="http://www.talend.com/online/featuresdescription.html#repository-feature">Complete description about this feature at http://www.talend.com/online/featuresdescription.html#repository-feature</description>
<copyright url="http://www.talend.com/online/copyright.txt">Copyright Talend 2006, 2007</copyright>
<license>The licence are describe in branding feature</license>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.azurestorage.feature"
label="Azure Storage"
version="8.8.8.qualifier">
version="8.0.1">
<description url="http://www.example.com/description">
Azure Storage

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.azurestorage.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.googledrive.feature"
label="Google Drive"
version="8.8.8.qualifier">
version="8.0.1">
<description url="http://www.example.com/description">
Google drive component

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.googledrive.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.jdbc.feature"
label="JDBC_feature"
version="8.8.8.qualifier">
version="8.0.1">
<description url="http://www.example.com/description">
[Enter Feature Description here.]

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.jdbc.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.jira.feature"
label="Jira"
version="8.8.8.qualifier">
version="8.0.1">
<description url="http://www.example.com/description">
Jira component

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.jira.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.marketo.feature"
label="Marketo"
version="8.8.8.qualifier">
version="8.0.1">
<description url="http://www.example.com/description">
Marketo component

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.marketo.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.marklogic.feature"
label="Marklogic"
version="8.8.8.qualifier">
version="8.0.1">
<description url="http://www.example.com/description">
Marklogic component

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.marklogic.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.netsuite.feature"
label="Netsuite"
version="8.8.8.qualifier">
version="8.0.1">
<description url="http://www.example.com/description">
Netsuite

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.netsuite.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.salesforce.feature"
label="Salesforce"
version="8.8.8.qualifier">
version="8.0.1">
<description url="http://www.example.com/description">
Salesforce component

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.salesforce.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.snowflake.feature"
label="SNOWFLAKE_feature"
version="8.8.8.qualifier">
version="8.0.1">
<description url="http://www.example.com/description">
Snowflake

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.snowflake.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.studio.components.tcompv0.splunk.feature"
label="Splunk"
version="8.8.8.qualifier">
version="8.0.1">
<description url="http://www.example.com/description">
Splunk component

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.studio.components.tcompv0.splunk.feature</artifactId>

View File

@@ -2,7 +2,7 @@
<feature
id="org.talend.tos.components.feature"
label="Components-feature"
version="8.8.8.qualifier">
version="8.0.1">
<description url="http://www.example.com/description">
[Enter Feature Description here.]

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.tos.components.feature</artifactId>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="org.talend.tos.core.feature" label="Feature" version="8.8.8.qualifier">
<feature id="org.talend.tos.core.feature" label="Feature" version="8.0.1">
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license url="http://www.example.com/license">[Enter License Description here.]</license>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.tos.core.feature</artifactId>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="org.talend.tos.feature" label="Tos feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
<feature id="org.talend.tos.feature" label="Tos feature" version="8.0.1" provider-name=".Talend SA.">
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license>[Enter License Description here.]</license>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.tos.feature</artifactId>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="org.talend.tos.libraries.feature" label="Libraries_feature" version="8.8.8.qualifier">
<feature id="org.talend.tos.libraries.feature" label="Libraries_feature" version="8.0.1">
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license url="http://www.example.com/license">[Enter License Description here.]</license>
@@ -43,6 +43,7 @@
<plugin id="org.talend.libraries.palo" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.persist.lookup" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.talend.libraries.salesforce" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.servlet" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.slf4j" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.xml" download-size="0" install-size="0" version="0.0.0"/>
<plugin id="org.talend.libraries.zmq" download-size="0" install-size="0" version="0.0.0"/>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.tos.libraries.feature</artifactId>

View File

@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Abstract Map Plug-in
Bundle-SymbolicName: org.talend.designer.abstractmap;singleton:=true
Bundle-Version: 8.8.8.qualifier
Bundle-Version: 8.0.1
Bundle-Activator: org.talend.designer.abstractmap.MapPlugin
Require-Bundle: org.eclipse.core.runtime,
org.talend.core,

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.abstractmap</artifactId>

View File

@@ -0,0 +1,20 @@
prefs.configuration.LINK_STYLE.AUTO=Auto
prefs.configuration.title=Map components preferences :
prefs.configuration.LINK_STYLE.LINE=Lines (fast)
prefs.configuration.LINK_STYLE.BEZIER_CURVE=Curves
prefs.configuration.LINK_STYLE=Default mapping links display as :
DraggingInfosPopup.draggingEntry=Dragging {0} entry.
DraggingInfosPopup.dropInvalid=\n<< Drop invalid >>\n
DraggingInfosPopup.draggingEntries=Dragging {0} entries.
DraggingInfosPopup.dropInvalidWithKey=\n<< Drop invalid >>\nPress both Shift and Ctrl keys to map one to one and overwrite
DraggingInfosPopup.overwriteMode=\ > Overwrite mode
DraggingInfosPopup.appendMode=\ > Append mode
DraggingInfosPopup.appendModeToOverwrite=\ > Append mode (Ctrl key to overwrite)
DraggingInfosPopup.insertAllSelectedEntries=\ > Insert all selected entries
DraggingInfosPopup.insertRemainingEntries=\ > Insert remaining entries
DraggingInfosPopup.eachSourceEntryExpressionToEachTargetExpression=> Each source entry expression to each target expression
DraggingInfosPopup.eachSourceEntryToEachTargetExpression=> Each source entry to each target expression
DraggingInfosPopup.allSourceEntriesExpressionToASingleOneTargetExpressionShiftKey=> All source entries expression to a single one target expression (Shift key to change mapping)
DraggingInfosPopup.allSourceEntriesExpressionToASingleOneTargetExpression=> All source entries expression to a single one target expression
DraggingInfosPopup.allSourceEntriesToASingleOneTargetExpressionShiftKey=> All source entries to a single one target expression (Shift key to change mapping)
DraggingInfosPopup.allSourceEntriesToASingleOneTargetExpression=> All source entries to a single one target expression

View File

@@ -6,7 +6,7 @@ prefs.configuration.LINK_STYLE.LINE=Lignes (rapide)
DraggingInfosPopup.draggingEntry=Glissement de {0} entr\u00E9e(s).
DraggingInfosPopup.dropInvalid=\n<< D\u00E9p\u00F4t impossible >>\n
DraggingInfosPopup.draggingEntries=Glissement de {0} entr\u00E9es.
DraggingInfosPopup.dropInvalidWithKey=\n<< D\u00E9p\u00F4t impossible >>\nAppuyez sur Maj et Ctrl pour mapper en un pour un et \u00E9craser
DraggingInfosPopup.dropInvalidWithKey=\n<<D\u00E9p\u00F4t impossible>>\n : appuyez sur Maj et Ctrl pour mapper en un pour un et \u00E9craser
DraggingInfosPopup.overwriteMode= > Mode \u00E9crasement
DraggingInfosPopup.appendMode= > Mode \u00E9criture \u00E0 la suite
DraggingInfosPopup.appendModeToOverwrite= > Mode \u00E9criture \u00E0 la suite (Ctrl pour \u00E9craser)

View File

@@ -3,18 +3,18 @@ prefs.configuration.LINK_STYLE=\u30C7\u30D5\u30A9\u30EB\u30C8\u30DE\u30C3\u30D4\
prefs.configuration.LINK_STYLE.AUTO=\u81EA\u52D5
prefs.configuration.LINK_STYLE.BEZIER_CURVE=\u66F2\u7DDA
prefs.configuration.LINK_STYLE.LINE=\u76F4\u7DDA\uFF08\u9AD8\u901F\uFF09
DraggingInfosPopup.draggingEntry={0}\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u3044\u307E\u3059\u3002
DraggingInfosPopup.draggingEntry={0}\u30A8\u30F3\u30C8\u30EA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u3044\u307E\u3059\u3002
DraggingInfosPopup.dropInvalid=\n<< \u7121\u52B9\u306A\u30C9\u30ED\u30C3\u30D7 >>\n
DraggingInfosPopup.draggingEntries={0}\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u3044\u307E\u3059\u3002
DraggingInfosPopup.dropInvalidWithKey=\n<< \u7121\u52B9\u306A\u30C9\u30ED\u30C3\u30D7 >>\nShift\u30AD\u30FC\u3068Ctrl\u30AD\u30FC\u3092\u540C\u6642\u306B\u62BC\u3059\u3068\u30011\u5BFE1\u3067\u30DE\u30C3\u30D4\u30F3\u30B0\u3055\u308C\u3066\u4E0A\u66F8\u304D\u3055\u308C\u307E\u3059
DraggingInfosPopup.draggingEntries={0}\u30A8\u30F3\u30C8\u30EA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u3044\u307E\u3059\u3002
DraggingInfosPopup.dropInvalidWithKey=\n<< \u7121\u52B9\u306A\u30C9\u30ED\u30C3\u30D7 >>\n\u4E00\u5BFE\u4E00\u30DE\u30C3\u30D4\u30F3\u30B0\u3057\u3001\u4E0A\u66F8\u304D\u3059\u308B\u5834\u5408\u306F\u3001Shift\u30AD\u30FC\u3068Ctrl\u30AD\u30FC\u3092\u540C\u6642\u306B\u62BC\u3057\u307E\u3059
DraggingInfosPopup.overwriteMode= > \u4E0A\u66F8\u304D\u30E2\u30FC\u30C9
DraggingInfosPopup.appendMode= > \u8FFD\u52A0\u30E2\u30FC\u30C9
DraggingInfosPopup.appendModeToOverwrite= > \u8FFD\u52A0\u30E2\u30FC\u30C9(\u4E0A\u66F8\u304D\u3059\u308B\u306B\u306F[Ctrl]\u30AD\u30FC)
DraggingInfosPopup.insertAllSelectedEntries= > \u9078\u629E\u3057\u305F\u3059\u3079\u3066\u306E\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u633F\u5165\u3057\u307E\u3059
DraggingInfosPopup.insertRemainingEntries= > \u6B8B\u308A\u306E\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u633F\u5165\u3057\u307E\u3059
DraggingInfosPopup.eachSourceEntryExpressionToEachTargetExpression=> \u5404\u30BF\u30FC\u30B2\u30C3\u30C8\u5F0F\u306B\u5BFE\u3059\u308B\u5404\u30BD\u30FC\u30B9\u30A8\u30F3\u30C8\u30EA\u30FC\u5F0F
DraggingInfosPopup.eachSourceEntryToEachTargetExpression=> \u5404\u30BF\u30FC\u30B2\u30C3\u30C8\u5F0F\u306B\u5BFE\u3059\u308B\u5404\u30BD\u30FC\u30B9\u30A8\u30F3\u30C8\u30EA\u30FC
DraggingInfosPopup.allSourceEntriesExpressionToASingleOneTargetExpressionShiftKey=> 1\u3064\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u5F0F\u306B\u5BFE\u3059\u308B\u3059\u3079\u3066\u306E\u30BD\u30FC\u30B9\u30A8\u30F3\u30C8\u30EA\u30FC\u5F0F (\u30DE\u30C3\u30D4\u30F3\u30B0\u3092\u5909\u66F4\u3059\u308B\u306B\u306FShift\u30AD\u30FC)
DraggingInfosPopup.allSourceEntriesExpressionToASingleOneTargetExpression=> 1\u3064\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u5F0F\u306B\u5BFE\u3059\u308B\u3059\u3079\u3066\u306E\u30BD\u30FC\u30B9\u30A8\u30F3\u30C8\u30EA\u30FC\u5F0F
DraggingInfosPopup.allSourceEntriesToASingleOneTargetExpressionShiftKey=> 1\u3064\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u5F0F\u306B\u5BFE\u3059\u308B\u3059\u3079\u3066\u306E\u30BD\u30FC\u30B9\u30A8\u30F3\u30C8\u30EA\u30FC (\u30DE\u30C3\u30D4\u30F3\u30B0\u3092\u5909\u66F4\u3059\u308B\u306B\u306FShift\u30AD\u30FC)
DraggingInfosPopup.allSourceEntriesToASingleOneTargetExpression=> 1\u3064\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u5F0F\u306B\u5BFE\u3059\u308B\u3059\u3079\u3066\u306E\u30BD\u30FC\u30B9\u30A8\u30F3\u30C8\u30EA\u30FC
DraggingInfosPopup.insertAllSelectedEntries= > \u9078\u629E\u3057\u305F\u3059\u3079\u3066\u306E\u30A8\u30F3\u30C8\u30EA\u3092\u633F\u5165\u3057\u307E\u3059
DraggingInfosPopup.insertRemainingEntries= > \u6B8B\u308A\u306E\u30A8\u30F3\u30C8\u30EA\u3092\u633F\u5165\u3057\u307E\u3059
DraggingInfosPopup.eachSourceEntryExpressionToEachTargetExpression=> \u5404\u30BF\u30FC\u30B2\u30C3\u30C8\u5F0F\u306B\u5BFE\u3059\u308B\u5404\u30BD\u30FC\u30B9\u30A8\u30F3\u30C8\u30EA\u5F0F
DraggingInfosPopup.eachSourceEntryToEachTargetExpression=> \u5404\u30BF\u30FC\u30B2\u30C3\u30C8\u5F0F\u306B\u5BFE\u3059\u308B\u5404\u30BD\u30FC\u30B9\u30A8\u30F3\u30C8\u30EA
DraggingInfosPopup.allSourceEntriesExpressionToASingleOneTargetExpressionShiftKey=> 1\u3064\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u5F0F\u306B\u5BFE\u3059\u308B\u3059\u3079\u3066\u306E\u30BD\u30FC\u30B9\u30A8\u30F3\u30C8\u30EA\u5F0F (\u30DE\u30C3\u30D4\u30F3\u30B0\u3092\u5909\u66F4\u3059\u308B\u306B\u306FShift\u30AD\u30FC)
DraggingInfosPopup.allSourceEntriesExpressionToASingleOneTargetExpression=> 1\u3064\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u5F0F\u306B\u5BFE\u3059\u308B\u3059\u3079\u3066\u306E\u30BD\u30FC\u30B9\u30A8\u30F3\u30C8\u30EA\u5F0F
DraggingInfosPopup.allSourceEntriesToASingleOneTargetExpressionShiftKey=> 1\u3064\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u5F0F\u306B\u5BFE\u3059\u308B\u3059\u3079\u3066\u306E\u30BD\u30FC\u30B9\u30A8\u30F3\u30C8\u30EA (\u30DE\u30C3\u30D4\u30F3\u30B0\u3092\u5909\u66F4\u3059\u308B\u306B\u306FShift\u30AD\u30FC)
DraggingInfosPopup.allSourceEntriesToASingleOneTargetExpression=> 1\u3064\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u5F0F\u306B\u5BFE\u3059\u308B\u3059\u3079\u3066\u306E\u30BD\u30FC\u30B9\u30A8\u30F3\u30C8\u30EA

View File

@@ -6,7 +6,7 @@ prefs.configuration.LINK_STYLE.LINE=\u76F4\u7EBF (\u5FEB)
DraggingInfosPopup.draggingEntry=\u62D6\u52A8 {0} \u6761\u76EE
DraggingInfosPopup.dropInvalid=\n<< \u65E0\u6548\u91CA\u653E >>\n
DraggingInfosPopup.draggingEntries=\u62D6\u52A8 {0} \u4E2A\u6761\u76EE\u3002
DraggingInfosPopup.dropInvalidWithKey=\n<< \u65E0\u6548\u653E\u7F6E >>\n\u6309\u4F4F Shift \u548C Ctrl \u952E\u4EE5\u8FDB\u884C\u4E00\u5BF9\u4E00\u6620\u5C04\u5E76\u6539\u5199
DraggingInfosPopup.dropInvalidWithKey=\n<<\u65E0\u6548\u653E\u7F6E>>\n\u6309\u4F4F Shift \u548C Ctrl \u952E\u4EE5\u8FDB\u884C\u4E00\u5BF9\u4E00\u6620\u5C04\u5E76\u6539\u5199
DraggingInfosPopup.overwriteMode= > \u91CD\u5199\u6A21\u5F0F
DraggingInfosPopup.appendMode= >\u9644\u52A0\u6A21\u5F0F
DraggingInfosPopup.appendModeToOverwrite= > \u8FFD\u52A0\u6A21\u5F0F (Ctrl \u952E\u6765\u6539\u5199)

View File

@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Alfresco Output Component Plug-in
Bundle-SymbolicName: org.talend.designer.alfrescooutput;singleton:=true
Bundle-Version: 8.8.8.qualifier
Bundle-Version: 8.0.1
Bundle-Vendor: .Talend SA.
Require-Bundle: org.eclipse.core.runtime,
org.talend.core,

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>8.8.8-SNAPSHOT</version>
<version>8.0.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.alfrescooutput</artifactId>

View File

@@ -0,0 +1,20 @@
AlfrescoModelDialog.missingAspectDefinitions.msg=The chosen aspects refer to unknown Alfresco aspect(s) : ${0}.\nPlease provide the alfresco model files that define them.
AlfrescoModelDialog.modelTable.title=Title
AlfrescoModelDialog.availableAspects=Available Aspects
AlfrescoModelDialog.missingAspectDefinitions.title=Missing aspect definitions
AlfrescoOutputManager.schemaError.title=Error in schema
AlfrescoModelDialog.missingTypeDefinitions.msg=The chosen type refers to unknown Alfresco type(s) or aspect(s) : ${0}.\nPlease provide the alfresco model files that define them.
AlfrescoModelDialog.missingTypeDefinitions.title=Missing type definitions
AlfrescoModelDialog.add=Add...
AlfrescoOutputModelManager.errorReadingModel=Error reading Alfresco model file
AlfrescoModelDialog.aspects=Aspects
AlfrescoOutputManager.schemaError.msg=Please synchronize schema first
AlfrescoOutputModelManager.alreadyAdded=This model has already been added
AlfrescoModelDialog.removeModelFailed=Failed to remove model
AlfrescoOutputModelManager.prefixConflict=Unable to add the model, prefix conflict with previously added model for
AlfrescoOutputModelManager.notYetAdded=This model has not yet been added
AlfrescoModelDialog.type=Type
AlfrescoModelDialog.addModelFailed=Failed to add model
AlfrescoModelDialog.modelTable.name=Name
AlfrescoModelDialog.remove=Remove
AlfrescoOutputManager.failedLoadModel=Failed to load model from component metadata, reinitializing

View File

@@ -4,7 +4,7 @@ AlfrescoOutputManager.schemaError.msg=\u6700\u521D\u306B\u30B9\u30AD\u30FC\u30DE
AlfrescoOutputModelManager.alreadyAdded=\u3053\u306E\u30E2\u30C7\u30EB\u306F\u65E2\u306B\u8FFD\u52A0\u6E08\u307F\u3067\u3059\u3002
AlfrescoOutputModelManager.errorReadingModel=Alfresco\u30E2\u30C7\u30EB\u30D5\u30A1\u30A4\u30EB\u306E\u8AAD\u8FBC\u307F\u30A8\u30E9\u30FC
AlfrescoOutputModelManager.notYetAdded=\u3053\u306E\u30E2\u30C7\u30EB\u306F\u307E\u3060\u8FFD\u52A0\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
AlfrescoOutputModelManager.prefixConflict=\u5148\u306B\u8FFD\u52A0\u3055\u308C\u305F\u30E2\u30C7\u30EB\u306E\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u306E\u885D\u7A81\u306E\u305F\u3081\u3001\u30E2\u30C7\u30EB\u306E\u8FFD\u52A0\u304C\u3067\u304D\u307E\u305B\u3093\u3002
AlfrescoOutputModelManager.prefixConflict=\u5148\u306B\u8FFD\u52A0\u3055\u308C\u305F\u30E2\u30C7\u30EB\u306E\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u306E\u885D\u7A81\u306E\u305F\u3081\u3001\u30E2\u30C7\u30EB\u306E\u8FFD\u52A0\u304C\u51FA\u6765\u307E\u305B\u3093\u3002
AlfrescoModelDialog.type=\u30BF\u30A4\u30D7
AlfrescoModelDialog.aspects=\u30A2\u30B9\u30DA\u30AF\u30C8
AlfrescoModelDialog.availableAspects=\u53EF\u80FD\u306A\u30A2\u30B9\u30DA\u30AF\u30C8
@@ -13,8 +13,8 @@ AlfrescoModelDialog.addModelFailed=\u30E2\u30C7\u30EB\u8FFD\u52A0\u306B\u5931\u6
AlfrescoModelDialog.remove=\u524A\u9664
AlfrescoModelDialog.removeModelFailed=\u30E2\u30C7\u30EB\u306E\u524A\u9664\u306B\u5931\u6557\u3057\u307E\u3057\u305F
AlfrescoModelDialog.missingTypeDefinitions.title=\u578B\u5B9A\u7FA9\u304C\u3042\u308A\u307E\u305B\u3093
AlfrescoModelDialog.missingTypeDefinitions.msg=\u9078\u629E\u3055\u308C\u305F\u30BF\u30A4\u30D7\u306F\u3001Alfresco\u306E\u4E0D\u660E\u306A\u30BF\u30A4\u30D7\u307E\u305F\u306F\u30A2\u30B9\u30DA\u30AF\u30C8: ${0}\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u3059\u3002\n\u305D\u308C\u3089\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u308Balfresco\u306E\u30E2\u30C7\u30EB\u30D5\u30A1\u30A4\u30EB\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002
AlfrescoModelDialog.missingTypeDefinitions.msg=\u9078\u629E\u3057\u305F\u65B9\u306F\u4E0D\u660E\u306EAlfresco\u578B\u3082\u3057\u304F\u306F\u30A2\u30B9\u30DA\u30AF\u30C8: ${0}\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u3059\u3002\n\u305D\u308C\u3089\u3092\u5B9A\u7FA9\u3057\u305FAlfresco\u30E2\u30C7\u30EB\u30D5\u30A1\u30A4\u30EB\u3092\u63D0\u4F9B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
AlfrescoModelDialog.missingAspectDefinitions.title=\u30A2\u30B9\u30DA\u30AF\u30C8\u5B9A\u7FA9\u304C\u3042\u308A\u307E\u305B\u3093\u3002
AlfrescoModelDialog.missingAspectDefinitions.msg=\u9078\u629E\u3055\u308C\u305F\u30A2\u30B9\u30DA\u30AF\u30C8\u306F\u3001Alfresco\u306E\u4E0D\u660E\u306A\u30A2\u30B9\u30DA\u30AF\u30C8: ${0}\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u3059\u3002\n\u305D\u308C\u3089\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u308Balfresco\u306E\u30E2\u30C7\u30EB\u30D5\u30A1\u30A4\u30EB\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002
AlfrescoModelDialog.missingAspectDefinitions.msg=\u9078\u629E\u3055\u308C\u305F\u30A2\u30B9\u30DA\u30AF\u30C8\u306F\u4E0D\u660E\u306EAlfresco\u30A2\u30B9\u30DA\u30AF\u30C8: ${0}\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u3059\u3002\n\u305D\u308C\u3089\u3092\u5B9A\u7FA9\u3057\u305FAlfresco\u30E2\u30C7\u30EB\u30D5\u30A1\u30A4\u30EB\u3092\u63D0\u4F9B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
AlfrescoModelDialog.modelTable.title=\u30BF\u30A4\u30C8\u30EB
AlfrescoModelDialog.modelTable.name=\u540D\u524D

View File

@@ -13,8 +13,8 @@ AlfrescoModelDialog.addModelFailed=\u6DFB\u52A0\u6A21\u578B\u5931\u8D25
AlfrescoModelDialog.remove=\u79FB\u9664
AlfrescoModelDialog.removeModelFailed=\u79FB\u9664\u6A21\u578B\u5931\u8D25
AlfrescoModelDialog.missingTypeDefinitions.title=\u7F3A\u7701\u7C7B\u578B\u5B9A\u4E49
AlfrescoModelDialog.missingTypeDefinitions.msg=\u6240\u9009\u62E9\u7684\u7C7B\u578B\u6D89\u53CA\u672A\u77E5\u7684 Alfresco \u7C7B\u578B\u6216\u65B9\u9762: ${0}\u3002\n\u8BF7\u63D0\u4F9B\u5B9A\u4E49\u8FD9\u4E9B aspect \u7684 Alfresco \u6A21\u578B\u6587\u4EF6\u3002
AlfrescoModelDialog.missingTypeDefinitions.msg=\u6240\u9009\u62E9\u7684\u7C7B\u578B\u6D89\u53CA\u4E00\u4E2A\u6216\u591A\u4E2A\u672A\u77E5\u7684 Alfresco \u7C7B\u578B\u6216asepct: ${0}.\n \u8BF7\u63D0\u4F9B\u5B9A\u4E49\u8FD9\u4E9B \u7C7B\u578B\u6216 aspect \u7684 Alfresco \u6A21\u578B\u6587\u4EF6\u3002
AlfrescoModelDialog.missingAspectDefinitions.title=\u7F3A\u7701\u65B9\u9762\u5B9A\u4E49
AlfrescoModelDialog.missingAspectDefinitions.msg=\u6240\u9009\u62E9\u7684\u65B9\u9762\u6D89\u53CA\u672A\u77E5\u7684Alfresco\u65B9\u9762: ${0}.\n\u8BF7\u63D0\u4F9B\u5B9A\u4E49\u8FD9\u4E9B aspect \u7684 Alfresco \u6A21\u578B\u6587\u4EF6\u3002
AlfrescoModelDialog.missingAspectDefinitions.msg=\u6240\u9009\u62E9\u7684\u65B9\u9762\u6D89\u53CA\u4E00\u4E2A\u6216\u591A\u4E2A\u672A\u77E5\u7684 Alfresco aspect: ${0}.\n \u8BF7\u63D0\u4F9B\u5B9A\u4E49\u8FD9\u4E9B aspect \u7684 Alfresco \u6A21\u578B\u6587\u4EF6\u3002
AlfrescoModelDialog.modelTable.title=\u6807\u9898
AlfrescoModelDialog.modelTable.name=\u540D\u79F0

View File

@@ -1,3 +1,4 @@
#Thu Jan 06 14:39:43 CST 2011
eclipse.preferences.version=1
encoding//src/main/java/org/talend/designer/codegen/components/model/ComponentsFactory.java=UTF-8
encoding//src/main/java/org/talend/designer/codegen/components/ui/ComponentsPreferencePage.java=UTF-8

View File

@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: CodeGen Plug-in
Bundle-SymbolicName: org.talend.designer.codegen;singleton:=true
Bundle-Version: 8.8.8.qualifier
Bundle-Version: 8.0.1
Bundle-Localization: plugin
Require-Bundle: org.talend.core.repository,
org.eclipse.emf.codegen,
@@ -33,10 +33,8 @@ Export-Package: org.talend.designer.codegen,
org.talend.designer.codegen.components.ui,
org.talend.designer.codegen.config,
org.talend.designer.codegen.exception,
org.talend.designer.codegen.i18n,
org.talend.designer.codegen.model,
org.talend.designer.codegen.proxy,
org.talend.designer.codegen.stigma
org.talend.designer.codegen.proxy
Bundle-Vendor: .Talend SA.
Bundle-Activator: org.talend.designer.codegen.CodeGeneratorActivator
Import-Package: org.apache.commons.lang

View File

@@ -1,232 +0,0 @@
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.core.model.process.IConnection
org.talend.core.model.process.IConnectionCategory
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.core.model.metadata.IMetadataTable
org.talend.core.model.metadata.IMetadataColumn
org.talend.core.model.metadata.types.JavaTypesManager
org.talend.core.model.metadata.types.JavaType
java.util.List
java.util.Map
"
%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
String cid = node.getUniqueName();
String nbRows = ElementParameterParser.getValue(node, "__NB_ROWS__");
List<Map<String, String>> tableValues =
(List<Map<String,String>>)ElementParameterParser.getObjectValue(
node,
"__VALUES__"
);
boolean use_singleMode = ("true").equals(ElementParameterParser.getValue(node, "__USE_SINGLEMODE__"));
boolean use_inTable = ("true").equals(ElementParameterParser.getValue(node, "__USE_INTABLE__"));
boolean use_inlineContent = ("true").equals(ElementParameterParser.getValue(node, "__USE_INLINECONTENT__"));
String fieldSeparator = ElementParameterParser.getValue(node, "__FIELDSEPARATOR__");
String rowSeparator = ElementParameterParser.getValue(node, "__ROWSEPARATOR__");
List<Map<String, String>> inTableValues =
(List<Map<String,String>>)ElementParameterParser.getObjectValue(
node,
"__INTABLE__"
);
List<IMetadataTable> metadatas = node.getMetadataList();
IMetadataTable metadata = null;
if ((metadatas!=null)&&(metadatas.size()>0)) {
metadata = metadatas.get(0);
}
List< ? extends IConnection> conns = node.getOutgoingSortedConnections();
//************** the original part that get only one value for each column ********************
if(use_singleMode){
if(tableValues != null && tableValues.size() > 0 && conns != null && conns.size() > 0) {
%>
for (int i_<%=cid%> = 0 ; i_<%=cid%> < <%=nbRows%> ; i_<%=cid%>++) {
<%
String firstConnName = "";
for(IConnection conn : conns) {
if(conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
firstConnName = conn.getName();
break;
} // if(conn) end
} // for(conns) end
if (firstConnName !=null && !"".equals(firstConnName)) {
for(Map<String, String> tableValue : tableValues) {
String lable = tableValue.get("SCHEMA_COLUMN");
String value = tableValue.get("VALUE");
if(value == null || value.length() == 0){ //use the default value
IMetadataColumn column = metadata.getColumn(lable);
String typeToGenerate = JavaTypesManager.getTypeToGenerate(column.getTalendType(), column.isNullable());
String defaultValue = JavaTypesManager.getDefaultValueFromJavaType(typeToGenerate, column.getDefault());
%>
<%=firstConnName%>.<%=lable %> = <%=defaultValue %>;
<%
}else{
%>
<%=firstConnName%>.<%=lable %> = <%=value %>;
<%
}
} // for (map) end
} // if(firstConnName) end
}
//***************************the original part end ***************************************
}else if(use_inTable){
//******************the new part ---get several values for each column*********************
if(inTableValues != null && inTableValues.size() > 0 && conns != null && conns.size() > 0) {
%>
int nb_line_<%=cid %> = 0;
<%
String firstConnName = "";
for(IConnection conn : conns) {
if(conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
firstConnName = conn.getName();
break;
}
}
if(firstConnName!=null && !firstConnName.equals("")){//XXX
%>
List<<%=firstConnName%>Struct> cacheList_<%=cid %> = new java.util.ArrayList<<%=firstConnName%>Struct>();
<%
for(Map<String, String> tableValue : inTableValues) {
%>
<%=firstConnName%> = new <%=firstConnName%>Struct();
<%
for(IMetadataColumn column: metadata.getListColumns()){
String label = column.getLabel();
String value = tableValue.get(label);
if(value == null || value.length() == 0){ //use the default value
String typeToGenerate = JavaTypesManager.getTypeToGenerate(column.getTalendType(), column.isNullable());
String defaultValue = JavaTypesManager.getDefaultValueFromJavaType(typeToGenerate, column.getDefault());
%>
<%=firstConnName%>.<%=label %> = <%=defaultValue %>;
<%
}else{
%>
<%=firstConnName%>.<%=label %> = <%=value %>;
<%
}
}
%>
cacheList_<%=cid %>.add(<%=firstConnName%>);
<%
}
}
%>
for (int i_<%=cid%> = 0 ; i_<%=cid%> < <%=nbRows%> ; i_<%=cid%>++) {
<%
if(firstConnName!=null && !firstConnName.equals("")){
%>
for(<%=firstConnName%>Struct tmpRow_<%=cid %> : cacheList_<%=cid %>){
<%
}
%>
nb_line_<%=cid %> ++;
<%
if(firstConnName!=null && !firstConnName.equals("")){
%>
<%=firstConnName%> = tmpRow_<%=cid %>;
<%
}
}
//********************the new part end*****************************************************
}else if(use_inlineContent){
String fileContent = ElementParameterParser.getValue(node,"__INLINECONTENT__");
String lineSeparator = "\r\n";
String fileContentEnCodeStr = "";
try {
fileContentEnCodeStr = java.util.Base64.getMimeEncoder().encodeToString(fileContent.getBytes("UTF-8"));
} catch (java.io.UnsupportedEncodingException e) {
e.printStackTrace();
}
%>
StringBuilder result_<%=cid %> = new StringBuilder();
<%
String[] arrayStr = fileContentEnCodeStr.split(lineSeparator);
for(String item : arrayStr){
%>
result_<%=cid %>.append("<%=item %>");
<%}%>
String originalFileContent_<%=cid %> = "";
try {
originalFileContent_<%=cid %> = new String(java.util.Base64.getMimeDecoder().decode(result_<%=cid %>.toString()), utf8Charset);
} catch (java.lang.Exception e) {
globalMap.put("<%=cid%>_ERROR_MESSAGE",e.getMessage());
e.printStackTrace();
}
int nb_line_<%=cid %> = 0;
for (int i_<%=cid%> = 0 ; i_<%=cid%> < <%=nbRows%> ; i_<%=cid%>++) {
java.io.InputStream ins_<%=cid %> = new java.io.ByteArrayInputStream(originalFileContent_<%=cid %>.getBytes(utf8Charset));
org.talend.fileprocess.FileInputDelimited fid_<%=cid %> = new org.talend.fileprocess.FileInputDelimited(ins_<%=cid %>, utf8Charset,<%=fieldSeparator %>,<%=rowSeparator %>,true, 0, 0, -1, -1, false);
while (fid_<%=cid %>.nextRecord()) {
nb_line_<%=cid %>++;
<%
String firstConnName = "";
for(IConnection conn : conns) {
if(conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
firstConnName = conn.getName();
break;
}
}
if(!firstConnName.equals("")){//XXX
%>
<%=firstConnName %> = new <%=firstConnName %>Struct();
<%
List<IMetadataColumn> columns = metadata.getListColumns();
int sizeListColumns = columns.size();
for (int i=0;i<sizeListColumns;i++) {//AAA
IMetadataColumn column=columns.get(i);
String label = column.getLabel();
String typeToGenerate = JavaTypesManager.getTypeToGenerate(column.getTalendType(), column.isNullable());
JavaType javaType = JavaTypesManager.getJavaTypeFromId(column.getTalendType());
String patternValue = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
String defaultValue = JavaTypesManager.getDefaultValueFromJavaType(typeToGenerate, column.getDefault());
%>
if(<%=i %> < fid_<%=cid %>.getColumnsCountOfCurrentRow()){
String colContent = fid_<%=cid %>.get(<%=i %>);
<%if(javaType == JavaTypesManager.STRING || javaType == JavaTypesManager.OBJECT) {%>
<%=firstConnName %>.<%=label %> = (colContent == null || colContent.length() == 0) ? <%=defaultValue %>: colContent;
<%}else if(javaType == JavaTypesManager.DATE){%>
<%=firstConnName %>.<%=label %> = (colContent == null || colContent.length() == 0) ? ParserUtils.parseTo_Date(<% if((defaultValue==null)||"".equals(defaultValue) || "null".equals(defaultValue)){%>(String)<%}%> <%=defaultValue %>, <%= patternValue %>) : ParserUtils.parseTo_Date(colContent, <%= patternValue %>);
<%}else if(javaType == JavaTypesManager.BYTE_ARRAY){%>
<%=firstConnName %>.<%=label %> = (colContent == null || colContent.length() == 0) ? <%=defaultValue %> : colContent.getBytes();
<%}else{%>
<%=firstConnName %>.<%=label %> = (colContent == null || colContent.trim().length() == 0) ? <%=defaultValue %> : ParserUtils.parseTo_<%= typeToGenerate %>(colContent);
<%}%>
} else {
<%if(javaType != JavaTypesManager.DATE){%>
<%=firstConnName %>.<%=label %> = <%=defaultValue %>;
<%}else {%>
<%=firstConnName %>.<%=label %> = ParserUtils.parseTo_Date(<% if(defaultValue==null||"".equals(defaultValue)|| "null".equals(defaultValue)){%>(String)<%}%><%=defaultValue %>, <%= patternValue %>);
<%}%>
}
<%
}//AAA
%>
<%
}//XXX
//********************the use_inTable part end*****************************************************
}
%>

View File

@@ -1,80 +0,0 @@
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.core.model.process.IConnection
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.core.model.process.IConnectionCategory
java.util.List
java.util.Map"
%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
String cid = node.getUniqueName();
String nbRows = ElementParameterParser.getValue(node, "__NB_ROWS__");
boolean use_singleMode = ("true").equals(ElementParameterParser.getValue(node, "__USE_SINGLEMODE__"));
boolean use_inTable = ("true").equals(ElementParameterParser.getValue(node, "__USE_INTABLE__"));
boolean use_inlineContent = ("true").equals(ElementParameterParser.getValue(node, "__USE_INLINECONTENT__"));
List<Map<String, String>> tableValues =
(List<Map<String,String>>)ElementParameterParser.getObjectValue(
node,
"__VALUES__"
);
List<Map<String, String>> inTableValues =
(List<Map<String,String>>)ElementParameterParser.getObjectValue(
node,
"__INTABLE__"
);
List< ? extends IConnection> conns = node.getOutgoingSortedConnections();
if(use_singleMode){
if(tableValues != null && tableValues.size() > 0 && conns != null && conns.size() > 0) {
%>
}
globalMap.put("<%=cid%>_NB_LINE", <%=nbRows%>);
<%
}
//********************the new part*****************************************************
}else if(use_inTable){
if(inTableValues != null && inTableValues.size() > 0 && conns != null && conns.size() > 0) {
String firstConnName = null;
for(IConnection conn : conns) {
if(conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
firstConnName = conn.getName();
break;
}
}
if(firstConnName!=null && !firstConnName.equals("")){
%>
}
<%
}
%>
}
<%
if(firstConnName!=null && !firstConnName.equals("")){
%>
cacheList_<%=cid %>.clear();
<%
}
%>
globalMap.put("<%=cid%>_NB_LINE", nb_line_<%=cid %>);
<%
}
//********************the new part*****************************************************
} else if(use_inlineContent){
%>
}
fid_<%=cid %>.close();
}
globalMap.put("<%=cid%>_NB_LINE", nb_line_<%=cid %>);
<%
}
%>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -1,90 +0,0 @@
<COMPONENT>
<HEADER PLATEFORM="ALL" SERIAL="" VERSION="0.102" STATUS="ALPHA"
COMPATIBILITY="ALL" AUTHOR="Talend" RELEASE_DATE="20050320A"
STARTABLE="true">
<SIGNATURE />
</HEADER>
<FAMILIES>
<FAMILY>Misc</FAMILY>
</FAMILIES>
<DOCUMENTATION>
<URL />
</DOCUMENTATION>
<CONNECTORS>
<CONNECTOR CTYPE="FLOW" MAX_INPUT="0" MAX_OUTPUT="1"/>
<CONNECTOR CTYPE="ITERATE" MAX_OUTPUT="1" MAX_INPUT="1" />
<CONNECTOR CTYPE="SUBJOB_OK" MAX_INPUT="1" />
<CONNECTOR CTYPE="SUBJOB_ERROR" MAX_INPUT="1" />
<CONNECTOR CTYPE="COMPONENT_OK" />
<CONNECTOR CTYPE="COMPONENT_ERROR" />
<CONNECTOR CTYPE="RUN_IF" />
</CONNECTORS>
<PARAMETERS>
<PARAMETER NAME="SCHEMA" FIELD="SCHEMA_TYPE" REQUIRED="true"
NUM_ROW="10">
<DEFAULT />
</PARAMETER>
<PARAMETER NAME="NB_ROWS" FIELD="TEXT" NUM_ROW="20">
<DEFAULT>1</DEFAULT>
</PARAMETER>
<PARAMETER NAME="USE_SINGLEMODE" FIELD="RADIO" REQUIRED="true"
NUM_ROW="30" GROUP="MODE">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="VALUES" FIELD="TABLE" REQUIRED="true"
NUM_ROW="35" NB_LINES="5" SHOW_IF="USE_SINGLEMODE=='true'" GROUP="MODE">
<ITEMS BASED_ON_SCHEMA="true">
<ITEM NAME="VALUE" />
</ITEMS>
</PARAMETER>
<PARAMETER NAME="USE_INTABLE" FIELD="RADIO" REQUIRED="true"
NUM_ROW="40" GROUP="MODE">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="INTABLE" FIELD="TABLE" REQUIRED="true"
NUM_ROW="45" NB_LINES="5" SHOW_IF="USE_INTABLE=='true'" GROUP="MODE">
<ITEMS COLUMNS_BASED_ON_SCHEMA="true">
</ITEMS>
</PARAMETER>
<PARAMETER NAME="USE_INLINECONTENT" FIELD="RADIO" REQUIRED="true"
NUM_ROW="50" GROUP="MODE">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="ROWSEPARATOR" FIELD="TEXT" NUM_ROW="52"
REQUIRED="true" SHOW_IF="USE_INLINECONTENT=='true'" GROUP="MODE">
<DEFAULT>"\n"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="FIELDSEPARATOR" FIELD="TEXT" NUM_ROW="52"
REQUIRED="true" SHOW_IF="USE_INLINECONTENT=='true'" GROUP="MODE">
<DEFAULT>";"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="INLINECONTENT" FIELD="MEMO" RAW="true" REQUIRED="true"
NUM_ROW="55" NB_LINES="10" SHOW_IF="USE_INLINECONTENT=='true'" GROUP="MODE">
</PARAMETER>
</PARAMETERS>
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Talen File Enhanced" MODULE="talend_file_enhanced-1.1.jar" MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.1" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_file_enhanced-1.1.jar" REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>
<RETURNS>
<RETURN NAME="NB_LINE" TYPE="id_Integer" AVAILABILITY="AFTER" />
</RETURNS>
</COMPONENT>

View File

@@ -1,7 +0,0 @@
NB_LINE.NAME=Anzahl an Zeilen
VALUES.NAME=Wert
VALUES.ITEM.VALUE=Wert
MODE.NAME=Modus
INLINECONTENT.NAME=Inhalt
ROWSEPARATOR.NAME=Zeilenseparator
FIELDSEPARATOR.NAME=Feldseparator

View File

@@ -1,6 +0,0 @@
NB_ROWS.NAME=N\u00FAmero de filas
VALUES.NAME=Valores
VALUES.ITEM.VALUE=Valor
INLINECONTENT.NAME=Contenido
ROWSEPARATOR.NAME=Separador de Fila
FIELDSEPARATOR.NAME=Separador de Campo

View File

@@ -1,14 +0,0 @@
LONG_NAME=Cr\u00E9e un flux fixe \u00E0 partir de variables internes
HELP=org.talend.help.tFixedFlowInput
NB_LINE.NAME=Nombre de lignes
NB_ROWS.NAME=Nombre de lignes
VALUES.NAME=Valeurs
VALUES.ITEM.VALUE=Valeur
INTABLE.NAME=Utiliser le tableau
MODE.NAME=Mode
USE_SINGLEMODE.NAME=Utiliser une table seule
USE_INTABLE.NAME=Utiliser le tableau
USE_INLINECONTENT.NAME=Utiliser du contenu align\u00E9 (fichier d\u00E9limit\u00E9)
INLINECONTENT.NAME=Contenu
ROWSEPARATOR.NAME=S\u00E9parateur de lignes
FIELDSEPARATOR.NAME=S\u00E9parateur de champs

View File

@@ -1,13 +0,0 @@
LONG_NAME=Crea un flusso fisso da variabili interne
NB_LINE.NAME=Numero di linee
NB_ROWS.NAME=Numero di righe
VALUES.NAME=Valori
VALUES.ITEM.VALUE=Valore
INTABLE.NAME=Tabella InLine
MODE.NAME=Modo
USE_SINGLEMODE.NAME=Utilizza tabella singola
USE_INTABLE.NAME=Utilizza tabella InLine
USE_INLINECONTENT.NAME=Utilizza contenuto Inline (file delimitato)
INLINECONTENT.NAME=contenuto
ROWSEPARATOR.NAME=Separatore riga
FIELDSEPARATOR.NAME=Separatore di campo

View File

@@ -1,14 +0,0 @@
LONG_NAME=\u5185\u90E8\u5909\u6570\u304B\u3089\u56FA\u5B9A\u30D5\u30ED\u30FC\u3092\u751F\u6210\u3057\u307E\u3059\u3002
HELP=org.talend.help.tFixedFlowInput
NB_LINE.NAME=\u884C\u6570
NB_ROWS.NAME=\u884C\u6570
VALUES.NAME=\u5024
VALUES.ITEM.VALUE=\u5024
INTABLE.NAME=\u30A4\u30F3\u30E9\u30A4\u30F3\u30C6\u30FC\u30D6\u30EB
MODE.NAME=\u30E2\u30FC\u30C9
USE_SINGLEMODE.NAME=\u30B7\u30F3\u30B0\u30EB\u30C6\u30FC\u30D6\u30EB\u306E\u4F7F\u7528
USE_INTABLE.NAME=\u30A4\u30F3\u30E9\u30A4\u30F3\u30C6\u30FC\u30D6\u30EB\u306E\u4F7F\u7528
USE_INLINECONTENT.NAME=\u30A4\u30F3\u30E9\u30A4\u30F3\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u4F7F\u7528
INLINECONTENT.NAME=\u30B3\u30F3\u30C6\u30F3\u30C4
ROWSEPARATOR.NAME=\u884C\u533A\u5207\u308A
FIELDSEPARATOR.NAME=\u30D5\u30A3\u30FC\u30EB\u30C9\u533A\u5207\u308A

View File

@@ -1,10 +0,0 @@
LONG_NAME=\u5185\u90E8\u5909\u6570\u304B\u3089\u56FA\u5B9A\u30D5\u30ED\u30FC\u3092\u4F5C\u6210
HELP=org.talend.help.tFixedFlowInput
NB_LINE.NAME=\u884c\u6570
NB_ROWS.NAME=\u30ed\u30a6\u6570
VALUES.NAME=\u5024
VALUES.ITEM.VALUE=\u5024
MODE.NAME=\u30E2\u30FC\u30C9
INLINECONTENT.NAME=\u30B3\u30F3\u30C6\u30F3\u30C4
ROWSEPARATOR.NAME=\u30ED\u30A6\u30BB\u30D1\u30EC\u30FC\u30BF
FIELDSEPARATOR.NAME=\u30D5\u30A3\u30FC\u30EB\u30C9\u30BB\u30D1\u30EC\u30FC\u30BF

View File

@@ -1,6 +0,0 @@
NB_LINE.NAME=\u0427\u0438\u0441\u043B\u043E \u0441\u0442\u0440\u043E\u043A
VALUES.NAME=\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u044F
VALUES.ITEM.VALUE=\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435
INLINECONTENT.NAME=\u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435
ROWSEPARATOR.NAME=\u0420\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044C \u0441\u0442\u0440\u043E\u043A
FIELDSEPARATOR.NAME=\u0420\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044C \u043F\u043E\u043B\u0435\u0439

View File

@@ -1,3 +0,0 @@
VALUES.ITEM.VALUE=Hodnota
MODE.NAME=M\u00F3d
INLINECONTENT.NAME=Obsah

View File

@@ -1,3 +0,0 @@
VALUES.ITEM.VALUE=Hodnota
MODE.NAME=Mód
INLINECONTENT.NAME=Obsah

View File

@@ -1,14 +0,0 @@
LONG_NAME=\u4ECE\u5185\u90E8\u53D8\u91CF\u521B\u5EFA\u56FA\u5B9A\u6D41
HELP=org.talend.help.tFixedFlowInput
NB_LINE.NAME=\u884C\u6570
NB_ROWS.NAME=\u884C\u6570
VALUES.NAME=\u503C
VALUES.ITEM.VALUE=\u503C
INTABLE.NAME=\u5185\u8054\u8868
MODE.NAME=\u6A21\u5F0F
USE_SINGLEMODE.NAME=\u4F7F\u7528\u5355\u8868
USE_INTABLE.NAME=\u4F7F\u7528\u5185\u8054\u8868
USE_INLINECONTENT.NAME=\u4F7F\u7528\u5185\u8054\u5185\u5BB9 (\u5206\u9694\u6587\u4EF6)
INLINECONTENT.NAME=\u5185\u5BB9
ROWSEPARATOR.NAME=\u884C\u5206\u9694\u7B26
FIELDSEPARATOR.NAME=\u5B57\u6BB5\u5206\u9694\u7B26

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -1,52 +0,0 @@
<COMPONENT>
<HEADER
PLATEFORM="ALL"
SERIAL=""
VERSION="0.101"
STATUS="ALPHA"
COMPATIBILITY="ALL"
AUTHOR="Talend"
RELEASE_DATE="20070210A"
STARTABLE="true"
PARTITIONING="AUTO"
>
<SIGNATURE></SIGNATURE>
</HEADER>
<FAMILIES>
<FAMILY>Custom_Code</FAMILY>
</FAMILIES>
<DOCUMENTATION>
<URL/>
</DOCUMENTATION>
<CONNECTORS>
<CONNECTOR CTYPE="FLOW" MAX_INPUT="1" MAX_OUTPUT="1"/>
<CONNECTOR CTYPE="ITERATE" MAX_OUTPUT="1" MAX_INPUT="1"/>
<CONNECTOR CTYPE="SUBJOB_OK" MAX_INPUT="1" />
<CONNECTOR CTYPE="SUBJOB_ERROR" MAX_INPUT="1" />
<CONNECTOR CTYPE="COMPONENT_OK"/>
<CONNECTOR CTYPE="COMPONENT_ERROR"/>
<CONNECTOR CTYPE="RUN_IF"/>
</CONNECTORS>
<PARAMETERS>
<PARAMETER NAME="CODE" FIELD="MEMO_JAVA" RAW="true" REQUIRED="false" NUM_ROW="2" NB_LINES="9" CONTEXT="begin">
<DEFAULT>String foo = "bar";</DEFAULT>
</PARAMETER>
</PARAMETERS>
<ADVANCED_PARAMETERS>
<PARAMETER NAME="IMPORT" FIELD="MEMO_IMPORT" RAW="true" REQUIRED="false" NUM_ROW="1" NB_LINES="3">
<DEFAULT>//import java.util.List;</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION/>
<RETURNS/>
</COMPONENT>

View File

@@ -1,3 +0,0 @@
CODE.NAME=Code
LONG_NAME=Erm\u00F6glich die manuelle Eingabe des Java-Codes f\u00FCr den Start Bereich der Komponente
IMPORT.NAME=Importiere

View File

@@ -1,4 +0,0 @@
CODE.NAME=Code
HELP=org.talend.help.tJava
LONG_NAME=Permet de saisir manuellement le code Java initial d'un composant
IMPORT.NAME=Import

View File

@@ -1,3 +0,0 @@
CODE.NAME=Codice
LONG_NAME=Permetti di inserire manualmente lo start Java-code in un componente
IMPORT.NAME=Importa

View File

@@ -1,4 +0,0 @@
CODE.NAME=\u30B3\u30FC\u30C9
HELP=org.talend.help.tJava
LONG_NAME=Java\u30B3\u30FC\u30C9\u306B\u3066\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u958B\u59CB\u51E6\u7406(begin)\u306E\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u30DE\u30CB\u30E5\u30A2\u30EB\u4F5C\u6210
IMPORT.NAME=\u30A4\u30F3\u30DD\u30FC\u30C8

View File

@@ -1,4 +0,0 @@
CODE.NAME=\u30B3\u30FC\u30C9
HELP=org.talend.help.tJava
LONG_NAME=Java\u30B3\u30FC\u30C9\u306B\u3066\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u958B\u59CB\u51E6\u7406(begin)\u306E\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u30DE\u30CB\u30E5\u30A2\u30EB\u4F5C\u6210
IMPORT.NAME=\u30A4\u30F3\u30DD\u30FC\u30C8

View File

@@ -1 +0,0 @@
CODE.NAME=\u041A\u043E\u0434

View File

@@ -1,4 +0,0 @@
CODE.NAME=\u4EE3\u7801
HELP=org.talend.help.tJava
LONG_NAME=\u5141\u8BB8\u624B\u52A8\u8F93\u5165\u7EC4\u4EF6\u7684 Java \u4EE3\u7801\u7684\u5F00\u59CB\u90E8\u5206\u3002
IMPORT.NAME=\u5BFC\u5165

View File

@@ -1,441 +0,0 @@
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.core.model.metadata.IMetadataTable
org.talend.core.model.metadata.IMetadataColumn
org.talend.core.model.metadata.types.JavaType
org.talend.core.model.process.IConnection
org.talend.core.model.process.IConnectionCategory
org.talend.core.model.metadata.types.JavaTypesManager
org.talend.core.model.utils.NodeUtil
java.util.List
java.util.Map
"
%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
List<IMetadataTable> metadatas = node.getMetadataList();
if ((metadatas!=null)&&(metadatas.size()>0)) {//1
IMetadataTable metadata = metadatas.get(0);
if (metadata!=null) {//2
String cid = node.getUniqueName();
String label = ElementParameterParser.getValue(node, "__LABEL__");
if(("__UNIQUE_NAME__").equals(label))
label=cid;
boolean tablePrint = ("true").equals(ElementParameterParser.getValue(node,"__TABLE_PRINT__"));
String printHeader = ElementParameterParser.getValue(node,"__PRINT_HEADER__");
boolean vertical = ("true").equals(ElementParameterParser.getValue(node,"__VERTICAL__"));
boolean uniquePrint = ("true").equals(ElementParameterParser.getValue(node,"__PRINT_UNIQUE__"));
boolean titlePrint = ("true").equals(ElementParameterParser.getValue(node,"__PRINT_LABEL__"));
boolean uniqueTitlePrint = ("true").equals(ElementParameterParser.getValue(node,"__PRINT_UNIQUE_LABEL__"));
boolean basic = !(tablePrint||vertical);
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
boolean isLogContent = ("true").equals(ElementParameterParser.getValue(node,"__PRINT_CONTENT_WITH_LOG4J__"));
List<IMetadataColumn> columns = metadata.getListColumns();
int sizeColumns = columns.size();
%>
///////////////////////
<%
if(tablePrint) { // table display mode
%>
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/tablePrintLogUtil.javajet"%>
<%
}
// vertical display mode
if(vertical) {
%>
class Util_<%=cid %> {
String[] des_top = { ".", "-" };
String[] des_data = { "-", "+" };
String[] des_frame = { "|" };
public void printLine(StringBuilder sb, int titleWidth, int dataWidth){
sb.append("+");
for(int i=0; i<titleWidth+2; i++)
sb.append("-");
sb.append("+");
for(int i=0; i<dataWidth+2; i++)
sb.append("-");
sb.append("+" + "\n");
}
public String print(String[] row, int nbLine){
StringBuilder sb = new StringBuilder();
<%
if(uniquePrint) {
%>
String title = "#" + nbLine + ". " + "<%=cid%>";
<%
} else if(titlePrint) {
%>
String title = "#" + nbLine + ". " + "<%=label%>";
<%
} else if(uniqueTitlePrint) {
%>
String title = "#" + nbLine + ". " + "<%=cid%>--<%=label%>";
<%
}
%>
//step 1: get the max length of all the row[] member;
int dataWidth = 5; //the length of the string "value"
for(int i=0;i<row.length;i++) {
if(row[i] == null && 4 > dataWidth) {
dataWidth = 4;
}
else if(row[i] != null && row[i].length()>dataWidth)
dataWidth = row[i].length();
}
<%
int titleWidth = 3; //the length of the string 'key'
for(IMetadataColumn column:columns)
if(column.getLabel().length()>titleWidth) titleWidth = column.getLabel().length();
%>
int titleWidth = <%=titleWidth%>;
int totalWidth = dataWidth + titleWidth + 5;
//step 2: print the header with line number
sb.append(".");
for(int i=0 ; i<totalWidth ; i++)
sb.append("-");
sb.append("." + "\n" + "|");
int emptyCenterWidth = (totalWidth-title.length())/2;
for(int i=0 ; i<emptyCenterWidth; i++)
sb.append(" ");
sb.append(title);
for(int i=0 ; i<totalWidth - emptyCenterWidth - title.length() ; i++)
sb.append(" ");
sb.append("|" + "\n");
//step 3: print "key" and "value"
printLine(sb,titleWidth,dataWidth);
sb.append("|" + " key");
for(int i=0; i<titleWidth-2; i++)
sb.append(" ");
sb.append("|" + " value");
for(int i=0; i<dataWidth-4; i++)
sb.append(" ");
sb.append("|" + "\n");
printLine(sb,titleWidth,dataWidth);
//step 4: print dataset
<%
int count = 0;
for(IMetadataColumn column:columns){
%>
//for(int i=0; i<row.length; i++){
sb.append("| " + "<%=column.getLabel()%>");
for(int i=0; i<titleWidth -"<%=column.getLabel()%>".length()+ 1 ;i++)
sb.append(" ");
sb.append("| " + row[<%=count%>]);
for(int i=0; row[<%=count%>] == null && i<dataWidth - 3 || row[<%=count%>] != null && i<dataWidth -row[<%=count%>].length()+ 1 ;i++)
sb.append(" ");
sb.append("|" + "\n");
//}
<%
count++;
}%>
//step 5: print a line gap
printLine(sb,titleWidth,dataWidth);
return sb.toString();
}
}
Util_<%=cid %> util_<%=cid %> = new Util_<%=cid %>();
java.io.PrintStream consoleOut_<%=cid%> = null;
if (globalMap.get("tLogRow_CONSOLE")!=null){
consoleOut_<%=cid%> = (java.io.PrintStream) globalMap.get("tLogRow_CONSOLE");
}else{
consoleOut_<%=cid%> = new java.io.PrintStream(new java.io.BufferedOutputStream(System.out));
globalMap.put("tLogRow_CONSOLE",consoleOut_<%=cid%>);
}
<%
}
if(basic) {// basic display mode
%>
final String OUTPUT_FIELD_SEPARATOR_<%=cid %> = <%=ElementParameterParser.getValue(node, "__FIELDSEPARATOR__") %>;
java.io.PrintStream consoleOut_<%=cid%> = null;
<%
if (("true").equals(printHeader)) {
%>
StringBuilder sbHeader_<%=cid%> = new StringBuilder();
<%
for (int i = 0; i < sizeColumns; i++) {
IMetadataColumn column = columns.get(i);
%>
sbHeader_<%=cid%>.append("<%=column.getLabel() %>");
<%
if(i == sizeColumns-1) break;
%>
sbHeader_<%=cid%>.append("\t");
<%
}
%>
if (globalMap.get("tLogRow_CONSOLE")!=null)
{
consoleOut_<%=cid%> = (java.io.PrintStream) globalMap.get("tLogRow_CONSOLE");
}
else
{
consoleOut_<%=cid%> = new java.io.PrintStream(new java.io.BufferedOutputStream(System.out));
globalMap.put("tLogRow_CONSOLE",consoleOut_<%=cid%>);
}
<%
if(isLogContent && isLog4jEnabled){
%>
log.info("<%=cid%> - Header names: " + sbHeader_<%=cid%>.toString());
<%
}
%>
consoleOut_<%=cid%>.println(sbHeader_<%=cid%>.toString());
consoleOut_<%=cid%>.flush();
<%
}
%>
<%
}
%>
StringBuilder strBuffer_<%=cid%> = null;
int nb_line_<%=cid%> = 0;
///////////////////////
<%
String printColumnNames = ElementParameterParser.getValue(node,"__PRINT_COLNAMES__");
String useFixedLength = ElementParameterParser.getValue(node,"__USE_FIXED_LENGTH__");
List<Map<String, String>> lengths = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node,"__LENGTHS__");
List< ? extends IConnection> conns = node.getIncomingConnections();
for (IConnection conn : conns) {//3
if (conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {//4
int schemaOptNum=100;
String schemaOptNumStr=ElementParameterParser.getValue(node, "__SCHEMA_OPT_NUM__");
if(schemaOptNumStr!=null && !"".equals(schemaOptNumStr) && !"\"\"".equals(schemaOptNumStr)){
schemaOptNum = Integer.parseInt(schemaOptNumStr);
}
boolean isOptimizeCode = false;
if(schemaOptNum < sizeColumns){
isOptimizeCode = true;
}
if(isOptimizeCode){//5
%>
class LogRowUtil_<%=cid%>{
<%
if (basic||vertical) { // A1
for (int i = 0; i < sizeColumns; i++) {//B1
IMetadataColumn column = columns.get(i);
JavaType javaType = JavaTypesManager.getJavaTypeFromId(column.getTalendType());
if(i%schemaOptNum==0){
%>
public void putBasicVerticalValue_<%=i/schemaOptNum%>(final <%=NodeUtil.getPrivateConnClassName(conn)%>Struct <%=conn.getName() %>,StringBuilder strBuffer_<%=cid%>){
<%
}
if (("true").equals(useFixedLength)) {//fix the column length
%>
java.util.Formatter formatter_<%=column.getLabel() %>_<%=cid%> = new java.util.Formatter(new StringBuilder());
<%
}
if (("true").equals(printColumnNames)) {//print the schema name
%>
strBuffer_<%=cid%>.append("<%=column.getLabel() %>: ");
<%
}
boolean isPrimitive = JavaTypesManager.isJavaPrimitiveType( javaType, column.isNullable());
if(!isPrimitive) { //begin
%>
if(<%=conn.getName() %>.<%=column.getLabel() %> != null) { //
<%
}
if (("true").equals(useFixedLength)) {//AAA
%>
strBuffer_<%=cid%>.append(formatter_<%=column.getLabel() %>_<%=cid%>.format("%1$"+<%=lengths.get(i).get("LENGTH") %>+"s",
<%
String pattern = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
if (javaType == JavaTypesManager.DATE && pattern != null && pattern.trim().length() != 0) {//Date
%>
FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, <%= pattern %>)
<%
} else if (javaType == JavaTypesManager.BYTE_ARRAY) {//byte[]
%>
java.nio.charset.Charset.defaultCharset().decode(java.nio.ByteBuffer.wrap(<%=conn.getName() %>.<%=column.getLabel() %>)).toString()
<%
} else if (javaType == JavaTypesManager.BIGDECIMAL) {
%>
<%=column.getPrecision() == null? conn.getName() + "." + column.getLabel() : conn.getName() + "." + column.getLabel() + ".setScale(" + column.getPrecision() + ", java.math.RoundingMode.HALF_UP)" %>.toPlainString()
<%
} else if (javaType == JavaTypesManager.DOUBLE || javaType == JavaTypesManager.FLOAT ) {
%>
FormatterUtils.formatUnwithE(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
} else {//others
%>
String.valueOf(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
}
%>
).toString());
<%
} else {//AAA
%>
strBuffer_<%=cid%>.append(
<%
String pattern = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
if (javaType == JavaTypesManager.DATE && pattern != null && pattern.trim().length() != 0) {//Date
%>
FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, <%= pattern %>)
<%
} else if (javaType == JavaTypesManager.BYTE_ARRAY) {//byte[]
%>
java.nio.charset.Charset.defaultCharset().decode(java.nio.ByteBuffer.wrap(<%=conn.getName() %>.<%=column.getLabel() %>)).toString()
<%
} else if (javaType == JavaTypesManager.BIGDECIMAL) {
%>
<%=column.getPrecision() == null? conn.getName() + "." + column.getLabel() : conn.getName() + "." + column.getLabel() + ".setScale(" + column.getPrecision() + ", java.math.RoundingMode.HALF_UP)" %>.toPlainString()
<%
} else if (javaType == JavaTypesManager.DOUBLE || javaType == JavaTypesManager.FLOAT ) {
%>
FormatterUtils.formatUnwithE(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
} else {//others
%>
String.valueOf(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
}
%>
);
<%
}//AAA
if(!isPrimitive) {//end
%>
} //
<%
}
if(i == sizeColumns-1){
if((i+1)%schemaOptNum==0){
%>
}
<%
}
break;
}else{
%>
strBuffer_<%=cid%>.append(<%=ElementParameterParser.getValue(node, "__FIELDSEPARATOR__") %>);
<%
}
if((i+1)%schemaOptNum==0){
%>
}
<%
}
}//B1
if(sizeColumns>0 && (sizeColumns%schemaOptNum)>0){
%>
}
<%
}
}//A1
if(tablePrint || vertical) { //C1
for (int i = 0; i < sizeColumns; i++) {//D1
IMetadataColumn column = columns.get(i);
JavaType javaType = JavaTypesManager.getJavaTypeFromId(column.getTalendType());
boolean isPrimitive = JavaTypesManager.isJavaPrimitiveType( javaType, column.isNullable());
if(i%schemaOptNum==0){
%>
public void putTableVerticalValue_<%=i/schemaOptNum%>(final <%=NodeUtil.getPrivateConnClassName(conn) %>Struct <%=conn.getName() %>,String[] row_<%=cid%>){
<%
}
if(!isPrimitive) { //begin
%>
if(<%=conn.getName() %>.<%=column.getLabel() %> != null) { //
<%
}
%>
row_<%=cid%>[<%=i %>]=
<%
String pattern = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
if (javaType == JavaTypesManager.DATE && pattern != null && pattern.trim().length() != 0) {//Date
%>
FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, <%= pattern %>)
<%
} else if (javaType == JavaTypesManager.BYTE_ARRAY) {//byte[]
%>
java.nio.charset.Charset.defaultCharset().decode(java.nio.ByteBuffer.wrap(<%=conn.getName() %>.<%=column.getLabel() %>)).toString()
<%
} else if (javaType == JavaTypesManager.BIGDECIMAL) {
%>
<%=column.getPrecision() == null? conn.getName() + "." + column.getLabel() : conn.getName() + "." + column.getLabel() + ".setScale(" + column.getPrecision() + ", java.math.RoundingMode.HALF_UP)" %>.toPlainString()
<%
} else if (javaType == JavaTypesManager.DOUBLE || javaType == JavaTypesManager.FLOAT ) {
%>
FormatterUtils.formatUnwithE(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
} else {//others
%>
String.valueOf(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
}
%>
;
<%
if(!isPrimitive) {//end
%>
} //
<%
}
if((i+1)%schemaOptNum==0){
%>
}
<%
}
}//D1
if(sizeColumns>0&&(sizeColumns%schemaOptNum)>0){
%>
}
<%
}
}//C1
%>
}
LogRowUtil_<%=cid%> logRowUtil_<%=cid%>=new LogRowUtil_<%=cid%>();
<%
}//5
}//4
}//3
}//2
}//1
%>

View File

@@ -1,54 +0,0 @@
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.core.model.metadata.IMetadataTable
java.util.List
"
%>
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/LogUtil.javajet"%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
log = new LogUtil(node);
List<IMetadataTable> metadatas = node.getMetadataList();
if ((metadatas!=null)&&(metadatas.size()>0)) {//1
IMetadataTable metadata = metadatas.get(0);
if (metadata!=null) {//2
String cid = node.getUniqueName();
String tablePrint = ElementParameterParser.getValue(node,"__TABLE_PRINT__");
%>
//////
<%
if (("true").equals(tablePrint)) {//print all records one time
%>
java.io.PrintStream consoleOut_<%=cid%> = null;
if (globalMap.get("tLogRow_CONSOLE")!=null)
{
consoleOut_<%=cid%> = (java.io.PrintStream) globalMap.get("tLogRow_CONSOLE");
}
else
{
consoleOut_<%=cid%> = new java.io.PrintStream(new java.io.BufferedOutputStream(System.out));
globalMap.put("tLogRow_CONSOLE",consoleOut_<%=cid%>);
}
consoleOut_<%=cid%>.println(util_<%=cid %>.format().toString());
consoleOut_<%=cid%>.flush();
<%
}
%>
//////
globalMap.put("<%=cid %>_NB_LINE",nb_line_<%=cid %>);
<%log.info(log.str("Printed row count: "), log.var("nb_line"), log.str("."));%>
///////////////////////
<%
}//2
}//1
%>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -1,103 +0,0 @@
<!-- $Id: tLogRow_perl.xml 1528 2007-01-19 17:03:36 +0000 (星期五, 19 一月 2007) smallet $ -->
<COMPONENT>
<HEADER PLATEFORM="ALL" SERIAL="" VERSION="0.101" STATUS="ALPHA"
COMPATIBILITY="ALL" AUTHOR="Talend" RELEASE_DATE="20050320A"
STARTABLE="false" PARTITIONING="AUTO" LOG4J_ENABLED="true">
<SIGNATURE></SIGNATURE>
</HEADER>
<FAMILIES>
<FAMILY>Logs_Errors</FAMILY>
</FAMILIES>
<DOCUMENTATION>
<URL />
</DOCUMENTATION>
<CONNECTORS>
<CONNECTOR CTYPE="FLOW" MAX_INPUT="1" MAX_OUTPUT="1"/>
<CONNECTOR CTYPE="ITERATE" MAX_OUTPUT="0" MAX_INPUT="0" />
<CONNECTOR CTYPE="SUBJOB_OK" MAX_INPUT="1" />
<CONNECTOR CTYPE="SUBJOB_ERROR" MAX_INPUT="1" />
<CONNECTOR CTYPE="COMPONENT_OK" />
<CONNECTOR CTYPE="COMPONENT_ERROR" />
<CONNECTOR CTYPE="RUN_IF" />
</CONNECTORS>
<PARAMETERS>
<PARAMETER NAME="SCHEMA" FIELD="SCHEMA_TYPE" REQUIRED="true"
NUM_ROW="10" />
<PARAMETER NAME="BASIC_MODE" FIELD="RADIO" NUM_ROW="11" GROUP="MODE">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="TABLE_PRINT" FIELD="RADIO" NUM_ROW="12" GROUP="MODE">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="VERTICAL" FIELD="RADIO" NUM_ROW="13" GROUP="MODE">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PRINT_UNIQUE" FIELD="RADIO" GROUP="TITLE_PRINT" NUM_ROW="15"
SHOW_IF="(BASIC_MODE == 'false') and (VERTICAL == 'true')">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PRINT_LABEL" FIELD="RADIO" GROUP="TITLE_PRINT" NUM_ROW="15"
SHOW_IF="(BASIC_MODE == 'false') and (VERTICAL == 'true')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PRINT_UNIQUE_LABEL" FIELD="RADIO" GROUP="TITLE_PRINT" NUM_ROW="15"
SHOW_IF="(BASIC_MODE == 'false') and (VERTICAL == 'true')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="FIELDSEPARATOR" FIELD="TEXT" NUM_ROW="20"
SHOW_IF="(TABLE_PRINT == 'false') and (VERTICAL == 'false')">
<DEFAULT>"|"</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PRINT_HEADER" FIELD="CHECK" NUM_ROW="25"
SHOW_IF="(TABLE_PRINT == 'false') and (VERTICAL == 'false')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PRINT_UNIQUE_NAME" FIELD="CHECK" NUM_ROW="30"
SHOW_IF="(TABLE_PRINT == 'false') and (VERTICAL == 'false')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="PRINT_COLNAMES" FIELD="CHECK" NUM_ROW="40"
SHOW_IF="(TABLE_PRINT == 'false') and (VERTICAL == 'false')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="USE_FIXED_LENGTH" FIELD="CHECK" NUM_ROW="50"
SHOW_IF="(TABLE_PRINT == 'false') and (VERTICAL == 'false')">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="LENGTHS" FIELD="TABLE" REQUIRED="true"
NUM_ROW="60" NB_LINES="5"
SHOW_IF="(USE_FIXED_LENGTH == 'true') and ((TABLE_PRINT == 'false') and (VERTICAL == 'false'))">
<ITEMS BASED_ON_SCHEMA="true">
<ITEM NAME="LENGTH" VALUE="10" />
</ITEMS>
</PARAMETER>
<PARAMETER NAME="PRINT_CONTENT_WITH_LOG4J" FIELD="CHECK" NUM_ROW="70" >
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="SCHEMA_OPT_NUM" FIELD="TEXT" NUM_ROW="100" REQUIRED="true" SHOW="false">
<DEFAULT>100</DEFAULT>
</PARAMETER>
</PARAMETERS>
<CODEGENERATION />
<RETURNS>
<RETURN NAME="NB_LINE" TYPE="id_Integer" AVAILABILITY="AFTER" />
</RETURNS>
</COMPONENT>

View File

@@ -1,313 +0,0 @@
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.core.model.metadata.IMetadataTable
org.talend.core.model.metadata.IMetadataColumn
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.core.model.process.IConnection
org.talend.core.model.process.IConnectionCategory
org.talend.core.model.metadata.types.JavaTypesManager
org.talend.core.model.metadata.types.JavaType
java.util.List
java.util.Map
"
%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
List<IMetadataTable> metadatas = node.getMetadataList();
if ((metadatas!=null)&&(metadatas.size()>0)) {//1
IMetadataTable metadata = metadatas.get(0);
if (metadata!=null) {//2
String cid = node.getUniqueName();
boolean tablePrint = ("true").equals(ElementParameterParser.getValue(node,"__TABLE_PRINT__"));
boolean vertical = ("true").equals(ElementParameterParser.getValue(node,"__VERTICAL__"));
boolean basic = !(tablePrint||vertical);
String printUniqueName = ElementParameterParser.getValue(node,"__PRINT_UNIQUE_NAME__");
String printColumnNames = ElementParameterParser.getValue(node,"__PRINT_COLNAMES__");
String useFixedLength = ElementParameterParser.getValue(node,"__USE_FIXED_LENGTH__");
List<Map<String, String>> lengths = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node,"__LENGTHS__");
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
boolean isLogContent = ("true").equals(ElementParameterParser.getValue(node,"__PRINT_CONTENT_WITH_LOG4J__"));
List< ? extends IConnection> conns = node.getIncomingConnections();
for (IConnection conn : conns) {//3
if (conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {//4
%>
///////////////////////
<%
List<IMetadataColumn> columns = metadata.getListColumns();
int sizeColumns = columns.size();
int schemaOptNum=100;
String schemaOptNumStr=ElementParameterParser.getValue(node, "__SCHEMA_OPT_NUM__");
if(schemaOptNumStr!=null && !"".equals(schemaOptNumStr) && !"\"\"".equals(schemaOptNumStr)){
schemaOptNum = Integer.parseInt(schemaOptNumStr);
}
boolean isOptimizeCode = false;
if(schemaOptNum < sizeColumns){
isOptimizeCode = true;
}
%>
<%
if (basic||vertical) { // don't print the table form//***
%>
strBuffer_<%=cid%> = new StringBuilder();
<%
if (("true").equals(printUniqueName)) {//print the component name.
%>
strBuffer_<%=cid%>.append("[<%=cid%>] ");
<%
}
%>
<%
for (int i = 0; i < sizeColumns; i++) {//5
IMetadataColumn column = columns.get(i);
JavaType javaType = JavaTypesManager.getJavaTypeFromId(column.getTalendType());
if(isOptimizeCode){
if(i%schemaOptNum == 0){
%>
logRowUtil_<%=cid%>.putBasicVerticalValue_<%=i/schemaOptNum%>(<%=conn.getName() %>,strBuffer_<%=cid%>);
<%
}
}else{
if (("true").equals(useFixedLength)) {//fix the column length
%>
java.util.Formatter formatter_<%=column.getLabel() %>_<%=cid%> = new java.util.Formatter(new StringBuilder());
<%
}
%>
<%
if (("true").equals(printColumnNames)) {//print the schema name
%>
strBuffer_<%=cid%>.append("<%=column.getLabel() %>: ");
<%
}
%>
<%
boolean isPrimitive = JavaTypesManager.isJavaPrimitiveType( javaType, column.isNullable());
if(!isPrimitive) { //begin
%>
if(<%=conn.getName() %>.<%=column.getLabel() %> != null) { //
<%
}
%>
<%
if (("true").equals(useFixedLength)) {//fixed the column length
%>
strBuffer_<%=cid%>.append(formatter_<%=column.getLabel() %>_<%=cid%>.format("%1$"+<%=lengths.get(i).get("LENGTH") %>+"s",
<%
String pattern = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
if (javaType == JavaTypesManager.DATE && pattern != null && pattern.trim().length() != 0) {//Date
%>
FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, <%= pattern %>)
<%
} else if (javaType == JavaTypesManager.BYTE_ARRAY) {//byte[]
%>
java.nio.charset.Charset.defaultCharset().decode(java.nio.ByteBuffer.wrap(<%=conn.getName() %>.<%=column.getLabel() %>)).toString()
<%
} else if (javaType == JavaTypesManager.BIGDECIMAL) {
%>
<%=column.getPrecision() == null? conn.getName() + "." + column.getLabel() : conn.getName() + "." + column.getLabel() + ".setScale(" + column.getPrecision() + ", java.math.RoundingMode.HALF_UP)" %>.toPlainString()
<%
} else if (javaType == JavaTypesManager.DOUBLE || javaType == JavaTypesManager.FLOAT ) {
%>
FormatterUtils.formatUnwithE(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
} else {//others
%>
String.valueOf(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
}
%>
).toString());
<%
} else {
%>
strBuffer_<%=cid%>.append(
<%
String pattern = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
if (javaType == JavaTypesManager.DATE && pattern != null && pattern.trim().length() != 0) {//Date
%>
FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, <%= pattern %>)
<%
} else if (javaType == JavaTypesManager.BYTE_ARRAY) {//byte[]
%>
java.nio.charset.Charset.defaultCharset().decode(java.nio.ByteBuffer.wrap(<%=conn.getName() %>.<%=column.getLabel() %>)).toString()
<%
} else if (javaType == JavaTypesManager.BIGDECIMAL) {
%>
<%=column.getPrecision() == null? conn.getName() + "." + column.getLabel() : conn.getName() + "." + column.getLabel() + ".setScale(" + column.getPrecision() + ", java.math.RoundingMode.HALF_UP)" %>.toPlainString()
<%
} else if (javaType == JavaTypesManager.DOUBLE || javaType == JavaTypesManager.FLOAT ) {
%>
FormatterUtils.formatUnwithE(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
} else {//others
%>
String.valueOf(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
}
%>
);
<%
}
%>
<%
if(!isPrimitive) {//end
%>
} //
<%
}
%>
<%
if(i == sizeColumns-1) break;
%>
strBuffer_<%=cid%>.append(<%=ElementParameterParser.getValue(node, "__FIELDSEPARATOR__") %>);
<%
}
}//5
}
if (basic) {
%>
if (globalMap.get("tLogRow_CONSOLE")!=null)
{
consoleOut_<%=cid%> = (java.io.PrintStream) globalMap.get("tLogRow_CONSOLE");
}
else
{
consoleOut_<%=cid%> = new java.io.PrintStream(new java.io.BufferedOutputStream(System.out));
globalMap.put("tLogRow_CONSOLE",consoleOut_<%=cid%>);
}
<%
if(isLogContent && isLog4jEnabled){
%>
log.info("<%=cid%> - Content of row "+(nb_line_<%=cid %>+1)+": " + strBuffer_<%=cid%>.toString());
<%
}
%>
consoleOut_<%=cid%>.println(strBuffer_<%=cid%>.toString());
consoleOut_<%=cid%>.flush();
nb_line_<%=cid %>++;
<%
}
if(tablePrint || vertical) { //print the table and vertical model//***
%>
String[] row_<%=cid%> = new String[<%=sizeColumns %>];
<%
for (int i = 0; i < sizeColumns; i++) {//5
IMetadataColumn column = columns.get(i);
JavaType javaType = JavaTypesManager.getJavaTypeFromId(column.getTalendType());
if(isOptimizeCode){
if(i%schemaOptNum == 0){
%>
logRowUtil_<%=cid%>.putTableVerticalValue_<%=i/schemaOptNum%>(<%=conn.getName() %>,row_<%=cid%>);
<%
}
}else{
boolean isPrimitive = JavaTypesManager.isJavaPrimitiveType( javaType, column.isNullable());
if(!isPrimitive) { //begin
%>
if(<%=conn.getName() %>.<%=column.getLabel() %> != null) { //
<%
}
%>
row_<%=cid%>[<%=i %>]=
<%
String pattern = column.getPattern() == null || column.getPattern().trim().length() == 0 ? null : column.getPattern();
if (javaType == JavaTypesManager.DATE && pattern != null && pattern.trim().length() != 0) {//Date
%>
FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, <%= pattern %>)
<%
} else if (javaType == JavaTypesManager.BYTE_ARRAY) {//byte[]
%>
java.nio.charset.Charset.defaultCharset().decode(java.nio.ByteBuffer.wrap(<%=conn.getName() %>.<%=column.getLabel() %>)).toString()
<%
} else if (javaType == JavaTypesManager.BIGDECIMAL) {
%>
<%=column.getPrecision() == null? conn.getName() + "." + column.getLabel() : conn.getName() + "." + column.getLabel() + ".setScale(" + column.getPrecision() + ", java.math.RoundingMode.HALF_UP)" %>.toPlainString()
<%
} else if (javaType == JavaTypesManager.DOUBLE || javaType == JavaTypesManager.FLOAT ) {
%>
FormatterUtils.formatUnwithE(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
} else {//others
%>
String.valueOf(<%=conn.getName() %>.<%=column.getLabel() %>)
<%
}
%>
;
<%
if(!isPrimitive) {//end
%>
} //
<%
}
%>
<%
}
}//5
if(tablePrint){
%>
util_<%=cid %>.addRow(row_<%=cid%>);
nb_line_<%=cid %>++;
<%
}else{
%>
nb_line_<%=cid %>++;
consoleOut_<%=cid%>.println(util_<%=cid %>.print(row_<%=cid%>,nb_line_<%=cid%>));
consoleOut_<%=cid%>.flush();
<%
}
if(isLogContent && isLog4jEnabled){
%>
log.info("<%=cid%> - Content of row "+nb_line_<%=cid %>+": " + TalendString.unionString("|",row_<%=cid%>));
<%
}
}//***
%>
//////
//////
///////////////////////
<%
}//4
}//3
}//2
}//1
%>

View File

@@ -1,10 +0,0 @@
LONG_NAME=Zeigt den Inhalt (Zeilen) des Datenflusses auf der RunJob-Konsole an.
MODE.NAME=Modus
BASIC_MODE.NAME=Einfach
VERTICAL.NAME=Vertikal (wobei jede Zeile eine Schl\u00FCssel/Wertliste ist)
FIELDSEPARATOR.NAME=Feldseparator
NB_LINE.NAME=Anzahl an Zeilen
USE_FIXED_LENGTH.NAME=Feste L\u00E4nge f\u00FCr Werte verwenden
LENGTHS.ITEM.LENGTH=L\u00E4nge
PRINT_HEADER.NAME=Kopfzeile ausgeben
PRINT_LABEL.NAME=Beschriftungen ausgeben

View File

@@ -1,3 +0,0 @@
BASIC_MODE.NAME=Basico
FIELDSEPARATOR.NAME=Separador de Campo
LENGTHS.ITEM.LENGTH=Longitud

View File

@@ -1,20 +0,0 @@
LONG_NAME=Affiche le contenu du flux (lignes) dans la console d'ex\u00E9cution du Job
HELP=org.talend.help.tLogRow
MODE.NAME=Mode
BASIC_MODE.NAME=Simple
TABLE_PRINT.NAME=Table (afficher les valeurs dans des cellules)
VERTICAL.NAME=Vertical (chaque ligne est une liste cl\u00E9/valeur)
FIELDSEPARATOR.NAME=S\u00E9parateur de champs
NB_LINE.NAME=Nombre de lignes
PRINT_UNIQUE_NAME.NAME=Afficher le nom unique du composant devant chaque ligne de sortie
PRINT_COLNAMES.NAME=Afficher le nom de la colonne du sch\u00E9ma en face de chaque valeur
USE_FIXED_LENGTH.NAME=Utiliser une longueur fixe pour les valeurs
LENGTHS.NAME=Longueurs
LENGTHS.ITEM.LENGTH=Longueur
PRINT_HEADER.NAME=Afficher l'en-t\u00EAte
PRINT_UNIQUE.NAME=Afficher le nom unique
PRINT_LABEL.NAME=Afficher le libell\u00E9
PRINT_UNIQUE_LABEL.NAME=Afficher le nom unique et le libell\u00E9
TITLE_PRINT.NAME=Mode d'affichage du titre
SCHEMA_OPT_NUM.NAME=Nombre minimum de colonnes au code optimis\u00E9
PRINT_CONTENT_WITH_LOG4J.NAME=Afficher le contenu avec Log4j

View File

@@ -1,17 +0,0 @@
LONG_NAME=Mostra il contenuto del flusso (righe) nella console del Run Job
MODE.NAME=Modalit\u00E0
BASIC_MODE.NAME=Base
TABLE_PRINT.NAME=Tabella (stampa valori nelle celle di una tabella)
VERTICAL.NAME=Verticale (ogni riga \u00E8 una lista chiave/valore)
FIELDSEPARATOR.NAME=Separatore di campo
NB_LINE.NAME=Numero riga
PRINT_UNIQUE_NAME.NAME=Stampa nome componenti univoci all'inizio di ogni riga di output
PRINT_COLNAMES.NAME=Stampa nome colonna dello schema all'inizio di ogni valore
USE_FIXED_LENGTH.NAME=Usa lunghezza fissa per valori
LENGTHS.NAME=Lunghezze
LENGTHS.ITEM.LENGTH=Lunghezza
PRINT_HEADER.NAME=Stampa Header
PRINT_UNIQUE.NAME=Stampa nome univoco
PRINT_LABEL.NAME=Stampa etichetta
PRINT_UNIQUE_LABEL.NAME=Stampa etichetta e nome univoco
TITLE_PRINT.NAME=Titolo modalit\u00E0 stampa

View File

@@ -1,20 +0,0 @@
LONG_NAME=[\u30B8\u30E7\u30D6\u5B9F\u884C]\u30B3\u30F3\u30BD\u30FC\u30EB\u3067\u30D5\u30ED\u30FC\u30B3\u30F3\u30C6\u30F3\u30C4(\u884C)\u3092\u8868\u793A\u3057\u307E\u3059\u3002
HELP=org.talend.help.tLogRow
MODE.NAME=\u30E2\u30FC\u30C9
BASIC_MODE.NAME=\u30D9\u30FC\u30B7\u30C3\u30AF
TABLE_PRINT.NAME=\u30C6\u30FC\u30D6\u30EB\uFF08\u8868\u306E\u30BB\u30EB\u3067\u5024\u3092\u8868\u793A\uFF09
VERTICAL.NAME=\u7E26\u306B\u51FA\u529B\uFF08\u5404\u884C\u3092\u30AD\u30FC/\u5024\u306E\u30EA\u30B9\u30C8\u3067\u8868\u793A\uFF09
FIELDSEPARATOR.NAME=\u30D5\u30A3\u30FC\u30EB\u30C9\u533A\u5207\u308A
NB_LINE.NAME=\u884C\u6570
PRINT_UNIQUE_NAME.NAME=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30E6\u30CB\u30FC\u30AF\u540D\u3092\u51FA\u529B\u306E\u5404\u884C\u306E\u524D\u306B\u8868\u793A
PRINT_COLNAMES.NAME=\u30AB\u30E9\u30E0\u540D\u3092\u5024\u306E\u524D\u306B\u8868\u793A
USE_FIXED_LENGTH.NAME=\u5024\u3092\u56FA\u5B9A\u9577\u3067\u8868\u793A
LENGTHS.NAME=\u9577\u3055
LENGTHS.ITEM.LENGTH=\u9577\u3055
PRINT_HEADER.NAME=\u30D8\u30C3\u30C0\u30FC\u306E\u8868\u793A
PRINT_UNIQUE.NAME=\u30E6\u30CB\u30FC\u30AF\u540D\u306E\u8868\u793A
PRINT_LABEL.NAME=\u30E9\u30D9\u30EB\u306E\u8868\u793A
PRINT_UNIQUE_LABEL.NAME=\u30E6\u30CB\u30FC\u30AF\u540D\u3068\u30E9\u30D9\u30EB\u306E\u8868\u793A
TITLE_PRINT.NAME=\u30BF\u30A4\u30C8\u30EB\u8868\u793A\u30E2\u30FC\u30C9
SCHEMA_OPT_NUM.NAME=\u6700\u9069\u5316\u30B3\u30FC\u30C9\u306E\u6700\u5C0F\u30AB\u30E9\u30E0\u6570
PRINT_CONTENT_WITH_LOG4J.NAME=log4j\u3067\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u5370\u5237

View File

@@ -1,7 +0,0 @@
HELP=org.talend.help.tLogRow
MODE.NAME=\u30E2\u30FC\u30C9
BASIC_MODE.NAME=\u30D9\u30FC\u30B7\u30C3\u30AF
FIELDSEPARATOR.NAME=\u30D5\u30A3\u30FC\u30EB\u30C9\u30BB\u30D1\u30EC\u30FC\u30BF
NB_LINE.NAME=\u30E9\u30A4\u30F3\u6570
LENGTHS.NAME=\u9577\u3055
LENGTHS.ITEM.LENGTH=\u9577\u3055

View File

@@ -1,5 +0,0 @@
BASIC_MODE.NAME=\u041E\u0441\u043D\u043E\u0432\u043D\u043E\u0439
VERTICAL.NAME=\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0439 (\u043A\u0430\u0436\u0434\u044B\u0439 \u0440\u044F\u0434 - \u043F\u0430\u0440\u0430 \u043A\u043B\u044E\u0447/\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435)
FIELDSEPARATOR.NAME=\u0420\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044C \u043F\u043E\u043B\u0435\u0439
NB_LINE.NAME=\u0427\u0438\u0441\u043B\u043E \u0441\u0442\u0440\u043E\u043A
LENGTHS.ITEM.LENGTH=\u0414\u043B\u0438\u043D\u0430

View File

@@ -1,2 +0,0 @@
MODE.NAME=M\u00F3d
LENGTHS.ITEM.LENGTH=D\u013A\u017Eka

View File

@@ -1,2 +0,0 @@
MODE.NAME=Mód
LENGTHS.ITEM.LENGTH=D\u013A\u017Eka

View File

@@ -1,20 +0,0 @@
LONG_NAME=\u5728\u8FD0\u884C\u4F5C\u4E1A\u63A7\u5236\u53F0\u4E0A\u663E\u793A\u6D41\u5185\u5BB9 (\u884C)
HELP=org.talend.help.tLogRow
MODE.NAME=\u6A21\u5F0F
BASIC_MODE.NAME=\u57FA\u672C
TABLE_PRINT.NAME=\u8868 (\u5728\u8868\u7684\u5355\u5143\u683C\u4E2D\u6253\u5370\u503C)
VERTICAL.NAME=\u5782\u76F4 (\u6BCF\u884C\u90FD\u662F\u4E00\u4E2A\u952E/\u503C\u5217\u8868)
FIELDSEPARATOR.NAME=\u5B57\u6BB5\u5206\u9694\u7B26
NB_LINE.NAME=\u884C\u6570
PRINT_UNIQUE_NAME.NAME=\u5728\u6BCF\u4E00\u4E2A\u8F93\u51FA\u884C\u524D\u6253\u5370\u552F\u4E00\u7EC4\u4EF6\u540D
PRINT_COLNAMES.NAME=\u5C06 schema \u5217\u540D\u6253\u5370\u5728\u6BCF\u4E2A\u503C\u7684\u524D\u9762
USE_FIXED_LENGTH.NAME=\u4F7F\u7528\u56FA\u5B9A\u957F\u5EA6\u7684\u503C
LENGTHS.NAME=\u957F\u5EA6
LENGTHS.ITEM.LENGTH=\u957F\u5EA6
PRINT_HEADER.NAME=\u6253\u5370\u6587\u4EF6\u5934
PRINT_UNIQUE.NAME=\u6253\u5370\u552F\u4E00\u540D\u79F0
PRINT_LABEL.NAME=\u6253\u5370\u6807\u7B7E
PRINT_UNIQUE_LABEL.NAME=\u6253\u5370\u552F\u4E00\u540D\u79F0\u548C\u6807\u7B7E
TITLE_PRINT.NAME=\u6807\u9898\u6253\u5370\u6A21\u5F0F
SCHEMA_OPT_NUM.NAME=\u4F18\u5316\u4EE3\u7801\u7684\u6700\u5C0F\u5217\u6570
PRINT_CONTENT_WITH_LOG4J.NAME=\u7528 log4j \u6253\u5370\u5185\u5BB9

View File

@@ -1,57 +0,0 @@
<%@ jet
%>
<%
JavaType[] commonTypes = {
JavaTypesManager.STRING,
JavaTypesManager.INTEGER,
JavaTypesManager.LONG,
JavaTypesManager.SHORT,
JavaTypesManager.BOOLEAN,
JavaTypesManager.CHARACTER,
JavaTypesManager.BYTE,
JavaTypesManager.BYTE_ARRAY,
JavaTypesManager.DATE,
JavaTypesManager.DOUBLE,
JavaTypesManager.FLOAT,
JavaTypesManager.OBJECT,
JavaTypesManager.LIST,
JavaTypesManager.BIGDECIMAL
};
for(JavaType sourceType : commonTypes) {
for(JavaType targetType : commonTypes) {
if(sourceType == targetType) {
continue;
}
String sourceTypeToGenerate = JavaTypesManager.getTypeToGenerate(sourceType.getId(), true);
sourceTypeToGenerate = sourceTypeToGenerate.contains(".") ? sourceTypeToGenerate.substring(sourceTypeToGenerate.lastIndexOf(".") + 1) : sourceTypeToGenerate;
if (("byte[]").equals(sourceTypeToGenerate)){
sourceTypeToGenerate = "byteArray";
}
String targetTypeToGenerate = JavaTypesManager.getTypeToGenerate(targetType.getId(), true);
targetTypeToGenerate = targetTypeToGenerate.contains(".") ? targetTypeToGenerate.substring(targetTypeToGenerate.lastIndexOf(".") + 1) : targetTypeToGenerate;
if (("byte[]").equals(targetTypeToGenerate)){
targetTypeToGenerate = "byteArray";
}
String function = null;
if("Date".equals(targetTypeToGenerate) && ("String".equals(sourceTypeToGenerate)||"Object".equals(sourceTypeToGenerate))) {
function = contact("routines.system.TypeConvert.", sourceTypeToGenerate, "2", targetTypeToGenerate, "(${0}, ${1})");
} else if("String".equals(targetTypeToGenerate) && "Date".equals(sourceTypeToGenerate)) {
function = contact("routines.system.TypeConvert.", sourceTypeToGenerate, "2", targetTypeToGenerate, "(${0}, ${1})");
} else {
function = contact("routines.system.TypeConvert.", sourceTypeToGenerate, "2", targetTypeToGenerate, "(${0})");
}
autoConverterMap.put(contact(sourceType.getId(), ":", targetType.getId()), function);
}
}
autoConverterMap.put(contact("id_Dynamic", ":", JavaTypesManager.STRING.getId()), "String.valueOf(${0})");
autoConverterMap.put(contact("id_Document", ":", JavaTypesManager.STRING.getId()), "String.valueOf(${0})");
autoConverterMap.put(contact(JavaTypesManager.STRING.getId(), ":", "id_Document"), "routines.system.ParserUtils.parseTo_Document(${0})");
%>

View File

@@ -1,40 +0,0 @@
<%@ jet
imports="
java.util.ArrayList
java.util.List
java.util.Map
java.util.HashMap
org.talend.core.model.metadata.IMetadataTable
org.talend.core.model.metadata.IMetadataColumn
org.talend.core.model.metadata.types.JavaTypesManager
org.talend.core.model.metadata.types.JavaType
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.designer.mapper.MapperComponent
org.talend.designer.mapper.external.data.ExternalMapperData
org.talend.designer.mapper.external.data.ExternalMapperTable
org.talend.designer.mapper.external.data.ExternalMapperTableEntry
org.talend.core.model.process.IConnection
org.talend.designer.mapper.language.ILanguage
org.talend.designer.mapper.language.generation.GenerationManagerFactory
org.talend.designer.mapper.language.generation.JavaGenerationManager
org.talend.designer.mapper.language.LanguageProvider
org.talend.core.model.process.ElementParameterParser
org.talend.core.model.process.EConnectionType
org.talend.core.model.process.INode
org.talend.core.model.utils.TalendTextUtils
org.talend.designer.mapper.model.tableentry.TableEntryLocation
org.talend.designer.mapper.utils.DataMapExpressionParser
"
skeleton="tMap_commons.skeleton"
%>
<%@ include file="tMap_begin.inc.javajet" %>

View File

@@ -1,259 +0,0 @@
public class CLASS {
public boolean hasConcurrencyContext(List<IConnection> inputConnections, List<? extends INode> graphicalNodes) {
for(IConnection connection : inputConnections) {
EConnectionType connectionType = connection.getLineStyle();
if (connectionType == EConnectionType.FLOW_MAIN) {
INode node = connection.getSource();
return recursiveSearchIterateForConcurrency(node, graphicalNodes);
}
}
return false;
}
public boolean hasIterateConnectionBefore(List<IConnection> inputConnections, List<? extends INode> graphicalNodes) {
for(IConnection connection : inputConnections) {
EConnectionType connectionType = connection.getLineStyle();
if (connectionType == EConnectionType.FLOW_MAIN) {
INode node = connection.getSource();
return recursiveSearchIterate(node, graphicalNodes);
}
}
return false;
}
public boolean recursiveSearchIterate(INode node, List<? extends INode> graphicalNodes) {
//System.out.println(node);
List<IConnection> connections = (List<IConnection>) node.getIncomingConnections();
for(IConnection connection : connections) {
EConnectionType connectionType = connection.getLineStyle();
if (connectionType == EConnectionType.FLOW_MAIN) {
node = connection.getSource();
//System.out.println(connection.getName() + " connectionType=" + connectionType + " connection=" + String.valueOf(connection));
return recursiveSearchIterate(node, graphicalNodes);
} else if(connectionType == EConnectionType.ITERATE) {
//System.out.println("ITERATE return true");
return true;
}else{
//for virtual component
boolean find = false;
for(INode loopNode : graphicalNodes) {
if(loopNode.getUniqueName().equals(node.getUniqueName())){
find = true;
}
}
if(!find){
List<IConnection> vConnections = (List<IConnection>) node.getIncomingConnections();
for(IConnection vConnection : vConnections) {
node = vConnection.getSource();
break;
}
return recursiveSearchIterate(node, graphicalNodes);
}
}
}
//System.out.println("return false");
return false;
}
private boolean recursiveSearchIterateForConcurrency(INode node, List<? extends INode> graphicalNodes) {
List<IConnection> connections = (List<IConnection>) node.getIncomingConnections();
for(IConnection connection : connections) {
EConnectionType connectionType = connection.getLineStyle();
if (connectionType == EConnectionType.FLOW_MAIN) {
node = connection.getSource();
return recursiveSearchIterateForConcurrency(node, graphicalNodes);
} else if(connectionType == EConnectionType.ITERATE) {
boolean parallelIterate = "true".equals(ElementParameterParser.getValue(connection, "__ENABLE_PARALLEL__"));
if(parallelIterate) {
return true;
} else {
node = connection.getSource();
return recursiveSearchIterateForConcurrency(node, graphicalNodes);
}
}else{
//for virtual component
boolean find = false;
for(INode loopNode : graphicalNodes) {
if(loopNode.getUniqueName().equals(node.getUniqueName())){
find = true;
}
}
if(!find){
List<IConnection> vConnections = (List<IConnection>) node.getIncomingConnections();
for(IConnection vConnection : vConnections) {
node = vConnection.getSource();
break;
}
return recursiveSearchIterateForConcurrency(node, graphicalNodes);
}
}
}
return false;
}
public INode searchSubProcessStartNode(IConnection connection) {
INode source = connection.getSource();
//System.out.println(" source=" + source);
INode subprocessStartNode = null;
if(source != null) {
String searchedComponentName = source.getUniqueName();
//System.out.println(" searchedComponentName=" + searchedComponentName);
List<? extends INode> generatedNodes = source.getProcess().getGeneratingNodes();
for(INode loopNode : generatedNodes) {
if(loopNode.getUniqueName().equals(searchedComponentName)) {
subprocessStartNode = loopNode.getSubProcessStartNode(false);
//System.out.println(" subprocessStartNode=" + subprocessStartNode.getUniqueName());
}
}
}
return subprocessStartNode;
}
public boolean hasJoinedTable(String tableNameToTest, ExternalMapperData data) {
for (ExternalMapperTable table : data.getOutputTables()) {
if (table.getIsJoinTableOf() != null && table.getIsJoinTableOf().equals(tableNameToTest)) {
return true;
}
}
return false;
}
public boolean isErrorReject(ExternalMapperTable table){
String errorMessage = null;
String errorStackTrace = null;
if(table!=null&&table.getName()!=null&&table.getName().endsWith("ErrorReject")){
for(ExternalMapperTableEntry entry:table.getMetadataTableEntries()){
if("errorMessage".equals(entry.getName())){
errorMessage = entry.getName();
}else if("errorStackTrace".equals(entry.getName())){
errorStackTrace = entry.getName();
}
}
if(errorMessage!=null&&errorStackTrace!=null){
return true;
}
}
return false;
}
public String getExpressionWithAutoConvertFunction(
String expression,
ExternalMapperTableEntry targetTableEntry,
IMetadataColumn targetColumn,
DataMapExpressionParser expressionParser,
Map<TableEntryLocation, ExternalMapperTableEntry> locationMap4Entry,
Map<TableEntryLocation, IMetadataColumn> locationMap4Column,
Map<String,String> autoConverterMap,
boolean enable_auto_convert_type) {
if(!enable_auto_convert_type) {
return expression;
}
if(expression == null || expression.isEmpty()) {
return expression;
}
TableEntryLocation uniqueLocation = getUniqueEntryLocation(expression);
if(uniqueLocation == null) {
return expression;
}
ExternalMapperTableEntry uniqueSourceEntry = locationMap4Entry.get(uniqueLocation);
if(uniqueSourceEntry == null) {
return expression;
}
String source_talend_type = uniqueSourceEntry.getType();
String target_talend_type = targetTableEntry.getType();
String convertFunction = autoConverterMap.get(contact(source_talend_type, ":", target_talend_type));
if(convertFunction!=null && !convertFunction.isEmpty()) {
StringBuilder strbuilder = new StringBuilder();
if(uniqueSourceEntry.isNullable()) {
strbuilder.append("(((").append(expression).append(") == null) ? null : (");
}
expression = convertFunction.replace("${0}", expression);
String pattern = null;
if((JavaTypesManager.STRING.getId().equals(source_talend_type)||JavaTypesManager.OBJECT.getId().equals(source_talend_type)) && JavaTypesManager.DATE.getId().equals(target_talend_type)) {
if(targetColumn!=null) {
pattern = targetColumn.getPattern();
}
if(pattern == null || pattern.isEmpty()) {
pattern = "\"dd-MM-yyyy\"";
}
} else if(JavaTypesManager.DATE.getId().equals(source_talend_type) && JavaTypesManager.STRING.getId().equals(target_talend_type)) {
IMetadataColumn sourceColumn = locationMap4Column.get(uniqueLocation);
if(sourceColumn!=null) {
pattern = sourceColumn.getPattern();
}
if(pattern == null || pattern.isEmpty()) {
pattern = "\"dd-MM-yyyy\"";
}
}
if(pattern != null) {
expression = expression.replace("${1}", pattern);
}
strbuilder.append(expression);
if(uniqueSourceEntry.isNullable()) {
strbuilder.append("))");
}
return strbuilder.toString();
}
return expression;
}
java.util.regex.Pattern locationPattern = java.util.regex.Pattern.compile(LanguageProvider.getJavaLanguage().getLocationPattern());
private TableEntryLocation getUniqueEntryLocation(String expression) {
java.util.regex.Matcher matcher = locationPattern.matcher(expression);
if(matcher.matches()) {
return new TableEntryLocation(matcher.group(1), matcher.group(2));
}
return null;
}
StringBuilder strbuilder = new StringBuilder(20);
private String contact(String... content) {
strbuilder.setLength(0);
for(String each : content) {
strbuilder.append(each);
}
return strbuilder.toString();
}
public String generate(Object argument) {
}
}

Some files were not shown because too many files have changed in this diff Show More