blob: 8e5646d6f3035e6c3d63323ce8906bf07dbf2e60 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en" dir="ltr" class="client-nojs">
<head>
<meta charset="UTF-8" />
<title>SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets - Eclipsepedia</title>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta name="generator" content="MediaWiki 1.23.2" />
<link rel="shortcut icon" href="http://wiki.eclipse.org/eclipse.org-common/themes/solstice/public/images/favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="http://wiki.eclipse.org/opensearch_desc.php" title="Eclipsepedia (en)" />
<link rel="EditURI" type="application/rsd+xml" href="http://wiki.eclipse.org/api.php?action=rsd" />
<link rel="alternate" type="application/atom+xml" title="Eclipsepedia Atom feed" href="http://wiki.eclipse.org/index.php?title=Special:RecentChanges&amp;feed=atom" />
<link rel="stylesheet" href="http://wiki.eclipse.org/load.php?debug=false&amp;lang=en&amp;modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.ui.button&amp;only=styles&amp;skin=solstice&amp;*" />
<link rel="stylesheet" href="http://wiki.eclipse.org/skins/solstice/public/stylesheets/styles.min.css?303" media="screen, print" /><meta name="ResourceLoaderDynamicStyles" content="" />
<style>a:lang(ar),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}
/* cache key: my_wiki:resourceloader:filter:minify-css:7:14ece53a42aa314864e5fd8c57f0d98f */</style>
<script src="http://wiki.eclipse.org/load.php?debug=false&amp;lang=en&amp;modules=startup&amp;only=scripts&amp;skin=solstice&amp;*"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets","wgTitle":"SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets","wgCurRevisionId":373858,"wgRevisionId":373858,"wgArticleId":15166,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["SMILA","SMILA/Pipelet"],"wgBreakFrames":false,"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRelevantPageName":"SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets","wgIsProbablyEditable":false,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgWikiEditorEnabledModules":{"toolbar":false,"dialogs":false,"hidesig":true,"preview":false,"previewDialog":false,"publish":false},"wgCategoryTreePageCategoryOptions":"{\"mode\":0,\"hideprefix\":20,\"showcount\":true,\"namespaces\":false}"});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function($,jQuery){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"editfont":"default","editondblclick":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":1,"extendwatchlist":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nickname":"","norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"rcdays":7,"rclimit":50,"rows":25,"showhiddencats":0,"shownumberswatching":1,"showtoolbar":1,"skin":"solstice","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":1,"watchdefault":1,"watchdeletion":0,"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,
"useeditwarning":1,"prefershttps":1,"language":"en","variant-gan":"gan","variant-iu":"iu","variant-kk":"kk","variant-ku":"ku","variant-shi":"shi","variant-sr":"sr","variant-tg":"tg","variant-uz":"uz","variant-zh":"zh","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"variant":"en"});},{},{});mw.loader.implement("user.tokens",function($,jQuery){mw.user.tokens.set({"editToken":"+\\","patrolToken":false,"watchToken":false});},{},{});
/* cache key: my_wiki:resourceloader:filter:minify-js:7:70d74423d3fc1e1c18fa9a1ff645a84a */
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
<style type="text/css">/*<![CDATA[*/
.source-xml {line-height: normal;}
.source-xml li, .source-xml pre {
line-height: normal; border: 0px none white;
}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for xml
* CSS class: source-xml, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
* (http://qbnz.com/highlighter/ and http://geshi.org/)
* --------------------------------------
*/
.xml.source-xml .de1, .xml.source-xml .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.xml.source-xml {font-family:monospace;}
.xml.source-xml .imp {font-weight: bold; color: red;}
.xml.source-xml li, .xml.source-xml .li1 {font-weight: normal; vertical-align:top;}
.xml.source-xml .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.xml.source-xml .li2 {font-weight: bold; vertical-align:top;}
.xml.source-xml .es0 {color: #000099; font-weight: bold;}
.xml.source-xml .br0 {color: #66cc66;}
.xml.source-xml .sy0 {color: #66cc66;}
.xml.source-xml .st0 {color: #ff0000;}
.xml.source-xml .nu0 {color: #cc66cc;}
.xml.source-xml .sc-1 {color: #808080; font-style: italic;}
.xml.source-xml .sc0 {color: #00bbdd;}
.xml.source-xml .sc1 {color: #ddbb00;}
.xml.source-xml .sc2 {color: #339933;}
.xml.source-xml .sc3 {color: #009900;}
.xml.source-xml .re0 {color: #000066;}
.xml.source-xml .re1 {color: #000000; font-weight: bold;}
.xml.source-xml .re2 {color: #000000; font-weight: bold;}
.xml.source-xml .ln-xtra, .xml.source-xml li.ln-xtra, .xml.source-xml div.ln-xtra {background-color: #ffc;}
.xml.source-xml span.xtra { display:block; }
/*]]>*/
</style><style type="text/css">/*<![CDATA[*/
.source-text {line-height: normal;}
.source-text li, .source-text pre {
line-height: normal; border: 0px none white;
}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for text
* CSS class: source-text, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
* (http://qbnz.com/highlighter/ and http://geshi.org/)
* --------------------------------------
*/
.text.source-text .de1, .text.source-text .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.text.source-text {font-family:monospace;}
.text.source-text .imp {font-weight: bold; color: red;}
.text.source-text li, .text.source-text .li1 {font-weight: normal; vertical-align:top;}
.text.source-text .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.text.source-text .li2 {font-weight: bold; vertical-align:top;}
.text.source-text .ln-xtra, .text.source-text li.ln-xtra, .text.source-text div.ln-xtra {background-color: #ffc;}
.text.source-text span.xtra { display:block; }
/*]]>*/
</style><style type="text/css">/*<![CDATA[*/
.source-javascript {line-height: normal;}
.source-javascript li, .source-javascript pre {
line-height: normal; border: 0px none white;
}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for javascript
* CSS class: source-javascript, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
* (http://qbnz.com/highlighter/ and http://geshi.org/)
* --------------------------------------
*/
.javascript.source-javascript .de1, .javascript.source-javascript .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.javascript.source-javascript {font-family:monospace;}
.javascript.source-javascript .imp {font-weight: bold; color: red;}
.javascript.source-javascript li, .javascript.source-javascript .li1 {font-weight: normal; vertical-align:top;}
.javascript.source-javascript .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.javascript.source-javascript .li2 {font-weight: bold; vertical-align:top;}
.javascript.source-javascript .kw1 {color: #000066; font-weight: bold;}
.javascript.source-javascript .kw2 {color: #003366; font-weight: bold;}
.javascript.source-javascript .kw3 {color: #000066;}
.javascript.source-javascript .kw5 {color: #FF0000;}
.javascript.source-javascript .co1 {color: #006600; font-style: italic;}
.javascript.source-javascript .co2 {color: #009966; font-style: italic;}
.javascript.source-javascript .coMULTI {color: #006600; font-style: italic;}
.javascript.source-javascript .es0 {color: #000099; font-weight: bold;}
.javascript.source-javascript .br0 {color: #009900;}
.javascript.source-javascript .sy0 {color: #339933;}
.javascript.source-javascript .st0 {color: #3366CC;}
.javascript.source-javascript .nu0 {color: #CC0000;}
.javascript.source-javascript .me1 {color: #660066;}
.javascript.source-javascript .ln-xtra, .javascript.source-javascript li.ln-xtra, .javascript.source-javascript div.ln-xtra {background-color: #ffc;}
.javascript.source-javascript span.xtra { display:block; }
/*]]>*/
</style><meta name="viewport" content="width=device-width, initial-scale=1.0"></head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-SMILA_Documentation_Bundle_org_eclipse_smila_processing_pipelets skin-solstice action-view" id="solstice">
<a class="sr-only" href="Bundle_org.eclipse.smila.processing.pipelets.html#content">Skip to main content</a>
<div class="thin-header">
<header role="banner" class="hidden-print noprint">
<div class="container-fluid">
<div id="row-logo-search">
<div id="header-left">
<div class="row">
<div class="hidden-xs col-sm-6 logo-container">
<a href="https://www.eclipse.org/" ><img class="logo-eclipse-default" src="http://wiki.eclipse.org/skins/solstice/public/images/logo/eclipse-800x188.png" alt="Eclipsepedia"></a>
</div>
<div class="navbar col-sm-18 yamm" id="main-menu">
<div class="navbar-collapse collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a target="_self" href="https://eclipse.org/downloads/">Download</a></li>
<li><a target="_self" href="https://eclipse.org/users/">Getting Started </a></li>
<li><a target="_self" href="https://eclipse.org/membership/">Members</a></li>
<li><a target="_self" href="https://eclipse.org/projects/">Projects</a></li>
<li class="dropdown visible-xs"><a class="dropdown-toggle" data-toggle="dropdown" href="Bundle_org.eclipse.smila.processing.pipelets.html#">Community <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="http://marketplace.eclipse.org">Marketplace</a></li><li><a href="http://events.eclipse.org">Events</a></li><li><a href="http://www.planeteclipse.org/">Planet Eclipse</a></li><li><a href="https://eclipse.org/community/eclipse_newsletter/">Newsletter</a></li><li><a href="https://www.youtube.com/user/EclipseFdn">Videos</a></li></ul></li><li class="dropdown visible-xs"><a class="dropdown-toggle" data-toggle="dropdown" href="Bundle_org.eclipse.smila.processing.pipelets.html#">Participate <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://bugs.eclipse.org/bugs/">Report a Bug</a></li><li><a href="https://eclipse.org/forums/">Forums</a></li><li><a href="https://eclipse.org/mail/">Mailing Lists</a></li><li><a href="https://wiki.eclipse.org/">Wiki</a></li><li><a href="https://wiki.eclipse.org/IRC">IRC</a></li><li><a href="https://eclipse.org/contribute/">How to Contribute</a></li></ul></li><li class="dropdown visible-xs"><a class="dropdown-toggle" data-toggle="dropdown" href="Bundle_org.eclipse.smila.processing.pipelets.html#">Working Groups <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="http://wiki.eclipse.org/Auto_IWG">Automotive</a></li><li><a href="http://iot.eclipse.org">Internet of Things</a></li><li><a href="http://locationtech.org">LocationTech</a></li><li><a href="http://lts.eclipse.org">Long-Term Support</a></li><li><a href="http://polarsys.org">PolarSys</a></li><li><a href="http://science.eclipse.org">Science</a></li><li><a href="http://openmdm.org">OpenMDM</a></li></ul></li><!-- More -->
<li class="dropdown hidden-xs"><a class="dropdown-toggle" data-toggle="dropdown">More<b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<!-- Content container to add padding -->
<div class="yamm-content">
<div class="row">
<ul class="col-sm-8 list-unstyled"><li><p><strong>Community</strong></p></li><li><a href="http://marketplace.eclipse.org">Marketplace</a></li><li><a href="http://events.eclipse.org">Events</a></li><li><a href="http://www.planeteclipse.org/">Planet Eclipse</a></li><li><a href="https://eclipse.org/community/eclipse_newsletter/">Newsletter</a></li><li><a href="https://www.youtube.com/user/EclipseFdn">Videos</a></li></ul><ul class="col-sm-8 list-unstyled"><li><p><strong>Participate</strong></p></li><li><a href="https://bugs.eclipse.org/bugs/">Report a Bug</a></li><li><a href="https://eclipse.org/forums/">Forums</a></li><li><a href="https://eclipse.org/mail/">Mailing Lists</a></li><li><a href="https://wiki.eclipse.org/">Wiki</a></li><li><a href="https://wiki.eclipse.org/IRC">IRC</a></li><li><a href="https://eclipse.org/contribute/">How to Contribute</a></li></ul><ul class="col-sm-8 list-unstyled"><li><p><strong>Working Groups</strong></p></li><li><a href="http://wiki.eclipse.org/Auto_IWG">Automotive</a></li><li><a href="http://iot.eclipse.org">Internet of Things</a></li><li><a href="http://locationtech.org">LocationTech</a></li><li><a href="http://lts.eclipse.org">Long-Term Support</a></li><li><a href="http://polarsys.org">PolarSys</a></li><li><a href="http://science.eclipse.org">Science</a></li><li><a href="http://openmdm.org">OpenMDM</a></li></ul> </div>
</div>
</li>
</ul>
</li>
</ul>
</div>
<div class="navbar-header">
<button data-target="#navbar-collapse-1" data-toggle="collapse" class="navbar-toggle" type="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="https://www.eclipse.org/" class="visible-xs navbar-brand"><img class="logo-eclipse-default" src="http://wiki.eclipse.org/skins/solstice/public/images/logo/eclipse-800x188.png" alt="Eclipsepedia" width="174"></a>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<section class="defaut-breadcrumbs hidden-print noprint hidden-print clearfix" id="breadcrumb">
<div>
<ol class="breadcrumb">
<li><a href="https://www.eclipse.org/">Home</a></li>
<li><a href="http://wiki.eclipse.org/Main_Page">Eclipse Wiki</a></li>
<li class="active">SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets</li></ol>
</div>
</section>
</div>
<div class="toolbar-menu breadcrumbs-offset noprint hidden-print margin-bottom-0 clearfix">
<div class="col-md-24">
<ol class="breadcrumb" role="navigation">
<li id="pt-login">
<a href="http://wiki.eclipse.org/index.php?title=Special:UserLogin&amp;returnto=SMILA%2FDocumentation%2FBundle+org.eclipse.smila.processing.pipelets">
<i class="fa fa-sign-in fa-fw orange"></i> Log in </a>
</li>
</ul>
</div>
</div>
<main role="main" class="background-grey">
<div class="container-full padding-top-25">
<!-- content -->
<section id="content" class="mw-body container-full clearfix 0">
<div id="mw-js-message" style="display:none;"></div>
<!-- bodyContent -->
<div id="bodyContent">
<!-- jumpto -->
<div id="jump-to-nav" class="mw-jump">
Jump to: <a href="Bundle_org.eclipse.smila.processing.pipelets.html#mw-head">navigation</a>,
<a href="Bundle_org.eclipse.smila.processing.pipelets.html#p-search">search</a>
</div>
<!-- /jumpto -->
<!-- leftcol -->
<aside class="col-md-4 noprint hidden-print" id="leftcol">
<form class="input-group" role="form" id="form-eclipse-search" action="http://wiki.eclipse.org/index.php" id="searchform">
<input id="searchInput" class="search-query form-control" type="search" accesskey="f" title="Special:Search" placeholder="Search" name="search" value="">
<span class="input-group-btn">
<button value="search" id="mw-searchButton" type="submit" class="btn btn-default" title="Search the pages for this text" name="fulltext">
<i class="fa fa-search"></i>
</button>
</span>
</form>
<select class="form-control margin-top-10 margin-bottom-10 visible-xs visible-sm" onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);"><option class="fw-700 "><span class="fw-700">---Navigation---</span></option><option value="/Main_Page">Main Page</option><option value="/Eclipsepedia:Community_portal">Community portal</option><option value="/Eclipsepedia:Current_events">Current events</option><option value="/Special:RecentChanges">Recent changes</option><option value="/Special:Random">Random page</option><option value="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents">Help</option></select><ul class="ul-left-nav fa-ul hidden-print leftnav hidden-xs hidden-sm"><li class="separator"><span class="separator">Navigation</span></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Main_Page" id="n-mainpage" title="Visit the main page [z]" accesskey="z">Main Page</a></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Eclipsepedia:Community_portal" id="n-portal" title="About the project, what you can do, where to find things">Community portal</a></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Eclipsepedia:Current_events" id="n-currentevents" title="Find background information on current events">Current events</a></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Special:RecentChanges" id="n-recentchanges" title="A list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Special:Random" id="n-randompage" title="Load a random page [x]" accesskey="x">Random page</a></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents" id="n-help" title="The place to find out">Help</a></li></ul> <select class="form-control margin-top-10 margin-bottom-10 visible-xs visible-sm" onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);"><option class="fw-700 "><span class="fw-700">---Toolbox---</span></option><option value="/index.php?title=SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets&amp;action=info">Page information</option><option value="/index.php?title=SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets&amp;oldid=373858">Permanent link</option><option value="/index.php?title=SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets&amp;printable=yes">Printable version</option><option value="/Special:SpecialPages">Special pages</option><option value="/Special:RecentChangesLinked/SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets">Related changes</option><option value="/Special:WhatLinksHere/SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets">What links here</option></select><ul class="ul-left-nav fa-ul hidden-print leftnav hidden-xs hidden-sm"><li class="separator"><span class="separator">Toolbox</span></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets&amp;action=info" id="t-info">Page information</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets&amp;oldid=373858" id="t-permalink" title="Permanent link to this revision of the page">Permanent link</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets&amp;printable=yes" id="t-print" rel="alternate" title="Printable version of this page [p]" accesskey="p">Printable version</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Special:SpecialPages" id="t-specialpages" title="A list of all special pages [q]" accesskey="q">Special pages</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Special:RecentChangesLinked/SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets" id="t-recentchangeslinked" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Special:WhatLinksHere/SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets" id="t-whatlinkshere" title="A list of all wiki pages that link here [j]" accesskey="j">What links here</a></li></ul> </aside>
<!-- /leftcol -->
<!-- mainContent -->
<div id="mainContent" class="col-md-20">
<ul class="nav nav-tabs noprint hidden-print" role="tablist">
<li id="ca-nstab-main" class="active"><a href="Bundle_org.eclipse.smila.processing.pipelets.html" title="View the content page [c]" accesskey="c" tabindex="-1">Page</a></li>
<li id="ca-talk" class="new"><a href="http://wiki.eclipse.org/index.php?title=Talk:SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets&amp;action=edit&amp;redlink=1" title="Discussion about the content page [t]" accesskey="t" tabindex="-1">Discussion</a></li>
<li id="ca-viewsource"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets&amp;action=edit" title="This page is protected.&#10;You can view its source [e]" accesskey="e" tabindex="-1">View source</a></li>
<li id="ca-history" class="collapsible"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets&amp;action=history" title="Past revisions of this page [h]" accesskey="h" tabindex="-1">History</a></li>
</ul> <div class="tab-content background-white">
<div id="tab-pane-main-page-content" class="tab-pane active">
<h1 id="firstHeading" class="firstHeading page-header">
<span dir="auto">SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets</span>
</h1>
<div id="main-page-content">
<!-- subtitle -->
<div id="contentSub" class="alert alert-small alert-warning"><span class="subpages">&lt; <a href="../../SMILA.html" title="SMILA">SMILA</a>&lrm; | <a href="../Documentation.1.html" title="SMILA/Documentation">Documentation</a></span></div>
<!-- /subtitle -->
<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><p>This page describes the SMILA pipelets provided by bundle <tt>org.eclipse.smila.processing.pipelets</tt>.
</p>
<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1 tocsection-1"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#General"><span class="tocnumber">1</span> <span class="toctext">General</span></a></li>
<li class="toclevel-1 tocsection-2"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.CommitRecordsPipelet"><span class="tocnumber">2</span> <span class="toctext">org.eclipse.smila.processing.pipelets.CommitRecordsPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-3"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Description"><span class="tocnumber">2.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2 tocsection-4"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration"><span class="tocnumber">2.2</span> <span class="toctext">Configuration</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-5"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.AddValuesPipelet"><span class="tocnumber">3</span> <span class="toctext">org.eclipse.smila.processing.pipelets.AddValuesPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-6"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_2"><span class="tocnumber">3.1</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-7"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Example"><span class="tocnumber">3.2</span> <span class="toctext">Example</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-8"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.SetValuePipelet"><span class="tocnumber">4</span> <span class="toctext">org.eclipse.smila.processing.pipelets.SetValuePipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-9"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_3"><span class="tocnumber">4.1</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-10"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Example_2"><span class="tocnumber">4.2</span> <span class="toctext">Example</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-11"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.RemoveAttributePipelet"><span class="tocnumber">5</span> <span class="toctext">org.eclipse.smila.processing.pipelets.RemoveAttributePipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-12"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_4"><span class="tocnumber">5.1</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-13"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Example_3"><span class="tocnumber">5.2</span> <span class="toctext">Example</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-14"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.FilterPipelet"><span class="tocnumber">6</span> <span class="toctext">org.eclipse.smila.processing.pipelets.FilterPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-15"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_5"><span class="tocnumber">6.1</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-16"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Example_4"><span class="tocnumber">6.2</span> <span class="toctext">Example</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-17"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.HtmlToTextPipelet"><span class="tocnumber">7</span> <span class="toctext">org.eclipse.smila.processing.pipelets.HtmlToTextPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-18"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Description_2"><span class="tocnumber">7.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2 tocsection-19"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_6"><span class="tocnumber">7.2</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-20"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Example_5"><span class="tocnumber">7.3</span> <span class="toctext">Example</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-21"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.CopyPipelet"><span class="tocnumber">8</span> <span class="toctext">org.eclipse.smila.processing.pipelets.CopyPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-22"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Description_3"><span class="tocnumber">8.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2 tocsection-23"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_7"><span class="tocnumber">8.2</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-24"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Example_6"><span class="tocnumber">8.3</span> <span class="toctext">Example</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-25"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.SubAttributeExtractorPipelet"><span class="tocnumber">9</span> <span class="toctext">org.eclipse.smila.processing.pipelets.SubAttributeExtractorPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-26"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Description_4"><span class="tocnumber">9.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2 tocsection-27"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_8"><span class="tocnumber">9.2</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-28"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Example_7"><span class="tocnumber">9.3</span> <span class="toctext">Example</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-29"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.ReplacePipelet"><span class="tocnumber">10</span> <span class="toctext">org.eclipse.smila.processing.pipelets.ReplacePipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-30"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Description_5"><span class="tocnumber">10.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2 tocsection-31"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_9"><span class="tocnumber">10.2</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-32"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Examples"><span class="tocnumber">10.3</span> <span class="toctext">Examples</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-33"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.ScriptPipelet"><span class="tocnumber">11</span> <span class="toctext">org.eclipse.smila.processing.pipelets.ScriptPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-34"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Description_6"><span class="tocnumber">11.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2 tocsection-35"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_10"><span class="tocnumber">11.2</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-36"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Examples_2"><span class="tocnumber">11.3</span> <span class="toctext">Examples</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-37"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.ExecPipelet"><span class="tocnumber">12</span> <span class="toctext">org.eclipse.smila.processing.pipelets.ExecPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-38"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Description_7"><span class="tocnumber">12.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2 tocsection-39"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_11"><span class="tocnumber">12.2</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-40"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Examples_3"><span class="tocnumber">12.3</span> <span class="toctext">Examples</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-41"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.MimeTypeIdentifyPipelet"><span class="tocnumber">13</span> <span class="toctext">org.eclipse.smila.processing.pipelets.MimeTypeIdentifyPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-42"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Description_8"><span class="tocnumber">13.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2 tocsection-43"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_12"><span class="tocnumber">13.2</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-44"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Example_8"><span class="tocnumber">13.3</span> <span class="toctext">Example</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-45"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.LanguageIdentifyPipelet"><span class="tocnumber">14</span> <span class="toctext">org.eclipse.smila.processing.pipelets.LanguageIdentifyPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-46"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Description_9"><span class="tocnumber">14.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2 tocsection-47"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_13"><span class="tocnumber">14.2</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-48"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Example_9"><span class="tocnumber">14.3</span> <span class="toctext">Example</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-49"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.FileReaderPipelet"><span class="tocnumber">15</span> <span class="toctext">org.eclipse.smila.processing.pipelets.FileReaderPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-50"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Description_10"><span class="tocnumber">15.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2 tocsection-51"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_14"><span class="tocnumber">15.2</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-52"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Example_10"><span class="tocnumber">15.3</span> <span class="toctext">Example</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-53"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.FileWriterPipelet"><span class="tocnumber">16</span> <span class="toctext">org.eclipse.smila.processing.pipelets.FileWriterPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-54"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Description_11"><span class="tocnumber">16.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2 tocsection-55"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_15"><span class="tocnumber">16.2</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-56"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Example_11"><span class="tocnumber">16.3</span> <span class="toctext">Example</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-57"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.PushRecordsPipelet"><span class="tocnumber">17</span> <span class="toctext">org.eclipse.smila.processing.pipelets.PushRecordsPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-58"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Description_12"><span class="tocnumber">17.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2 tocsection-59"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_16"><span class="tocnumber">17.2</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-60"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Example_12"><span class="tocnumber">17.3</span> <span class="toctext">Example</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-61"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.JSONReaderPipelet"><span class="tocnumber">18</span> <span class="toctext">org.eclipse.smila.processing.pipelets.JSONReaderPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-62"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Description_13"><span class="tocnumber">18.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2 tocsection-63"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_17"><span class="tocnumber">18.2</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-64"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Examples_4"><span class="tocnumber">18.3</span> <span class="toctext">Examples</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-65"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.JSONWriterPipelet"><span class="tocnumber">19</span> <span class="toctext">org.eclipse.smila.processing.pipelets.JSONWriterPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-66"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Description_14"><span class="tocnumber">19.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2 tocsection-67"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_18"><span class="tocnumber">19.2</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-68"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Examples_5"><span class="tocnumber">19.3</span> <span class="toctext">Examples</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-69"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.DocumentSplitterPipelet"><span class="tocnumber">20</span> <span class="toctext">org.eclipse.smila.processing.pipelets.DocumentSplitterPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-70"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_19"><span class="tocnumber">20.1</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-71"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Example_13"><span class="tocnumber">20.2</span> <span class="toctext">Example</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-72"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.CodecPipelet"><span class="tocnumber">21</span> <span class="toctext">org.eclipse.smila.processing.pipelets.CodecPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-73"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Decoding"><span class="tocnumber">21.1</span> <span class="toctext">Decoding</span></a></li>
<li class="toclevel-2 tocsection-74"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Encoding"><span class="tocnumber">21.2</span> <span class="toctext">Encoding</span></a></li>
<li class="toclevel-2 tocsection-75"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_20"><span class="tocnumber">21.3</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-76"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Example_14"><span class="tocnumber">21.4</span> <span class="toctext">Example</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-77"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.StoreWriterPipelet"><span class="tocnumber">22</span> <span class="toctext">org.eclipse.smila.processing.pipelets.StoreWriterPipelet</span></a>
<ul>
<li class="toclevel-2 tocsection-78"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Configuration_21"><span class="tocnumber">22.1</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-79"><a href="Bundle_org.eclipse.smila.processing.pipelets.html#Example_15"><span class="tocnumber">22.2</span> <span class="toctext">Example</span></a></li>
</ul>
</li>
</ul>
</div>
<h2><span class="mw-headline" id="General">General</span></h2>
<p>All pipelets in this bundle support the configurable error handling as described in <a href="../Development_Guidelines/How_to_write_a_Pipelet.html#Implementation" title="SMILA/Development Guidelines/How to write a Pipelet" class="mw-redirect">SMILA/Development_Guidelines/How_to_write_a_Pipelet#Implementation</a>. When used in jobmanager workflows, records causing errors are dropped.
</p><p><b> Read Type </b>
</p>
<ul>
<li> <i>runtime</i>: Parameters are read when processing records. Parameter value can be set per Record.
</li>
<li> <i>init</i>: Parameters are read once from Pipelet configuration when initializing the Pipelet. Parameter value can not be overwritten in Record.
</li>
</ul>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.CommitRecordsPipelet">org.eclipse.smila.processing.pipelets.CommitRecordsPipelet</span></h2>
<h3><span class="mw-headline" id="Description">Description</span></h3>
<p>Commits each record in the <i>input</i> variable on the blackboard to the storages. Can be used to save the records immediately during the workflow instead of only when a workflow has been finished.
</p>
<h3><span class="mw-headline" id="Configuration">Configuration</span></h3>
<p>none.
</p>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.AddValuesPipelet">org.eclipse.smila.processing.pipelets.AddValuesPipelet</span></h2>
<p>Adds something to an attribute in the processed records. If the attribute does not contain a sequence already, the current value will be wrapped in one before the new values are added.
</p>
<h3><span class="mw-headline" id="Configuration_2">Configuration</span></h3>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>outputAttribute</i>
</td>
<td>string
</td>
<td>runtime
</td>
<td>The name of the attribute to add values to
</td></tr>
<tr>
<td><i>valuesToAdd</i>
</td>
<td>Anything, usually a value or a sequence of values
</td>
<td>runtime
</td>
<td>The values to add
</td></tr></table>
<h3><span class="mw-headline" id="Example">Example</span></h3>
<p>From a test pipeline: This adds two string values to whatever already exists in attribute "out" of the processed records.
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;addValuesToNonExistingAttribute&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.AddValuesPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputAttribute&quot;</span><span class="re2">&gt;</span></span>out<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Seq</span> <span class="re0">key</span>=<span class="st0">&quot;valuesToAdd&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;rec:Val<span class="re2">&gt;</span></span></span>value1<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val<span class="re2">&gt;</span></span></span>value2<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/rec:Seq<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.SetValuePipelet">org.eclipse.smila.processing.pipelets.SetValuePipelet</span></h2>
<p>Sets a value for an attribute in every processed records. If the attribute exists already, it is not change by default. Useful for initializations of required attributes.
</p>
<h3><span class="mw-headline" id="Configuration_3">Configuration</span></h3>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>outputAttribute</i>
</td>
<td>string
</td>
<td>runtime
</td>
<td>The name of the attribute to set the value for
</td></tr>
<tr>
<td><i>value</i>
</td>
<td>anything
</td>
<td>runtime
</td>
<td>The constant value to set for the attribute (a map or sequence is possible, too)
</td></tr>
<tr>
<td><i>overwrite</i>
</td>
<td>boolean
</td>
<td>runtime
</td>
<td>Indicates to overwrite any value that the attribute contains already (optional, defaults to false)
</td></tr></table>
<h3><span class="mw-headline" id="Example_2">Example</span></h3>
<p>This sets a map containing two values into attribute1, even if there is already a value in that attribute.
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;setMapForExistingAttribute&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.SetValuePipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputAttribute&quot;</span><span class="re2">&gt;</span></span>attribute1<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;overwrite&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;boolean&quot;</span><span class="re2">&gt;</span></span>true<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Map</span> <span class="re0">key</span>=<span class="st0">&quot;value&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;key1&quot;</span><span class="re2">&gt;</span></span>value1<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;key2&quot;</span><span class="re2">&gt;</span></span>value2<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/rec:Map<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.RemoveAttributePipelet">org.eclipse.smila.processing.pipelets.RemoveAttributePipelet</span></h2>
<p>Removes an attribute from each record.
</p>
<h3><span class="mw-headline" id="Configuration_4">Configuration</span></h3>
<p>The configuration property is either read from the <tt>_parameters</tt> attribute of a record or from the pipelet configuration. If not set at all, the record remains unchanged.
</p>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>removeAttribute</i>
</td>
<td>A string value
</td>
<td>runtime
</td>
<td>The name of the attribute to remove
</td></tr></table>
<h3><span class="mw-headline" id="Example_3">Example</span></h3>
<p>To remove the complete structure in attribute <tt>_parameters</tt>, use:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;removeParameters&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.RemoveAttributePipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;result&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;result&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;removeAttribute&quot;</span><span class="re2">&gt;</span></span>_parameters<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.FilterPipelet">org.eclipse.smila.processing.pipelets.FilterPipelet</span></h2>
<p>Copies only those record IDs to the result which match a configurable regular expression in a configurable single-valued attribute. This is useful for conditional processing while at the same time pushing multiple records through the pipeline in a single request: Instead of using BPEL conditions use a FilterPipelet to select only the matching records in a new variable and use the this variable as the input variable for the next pipelets. You can still use the original BPEL variable in the BPEL <tt>&lt;reply&gt;</tt> activity at the end of the pipeline to return all records as the final result.
</p>
<h3><span class="mw-headline" id="Configuration_5">Configuration</span></h3>
<p>The configuration properties are read either from the <tt>_parameters</tt> attribute of each record or from the pipelet configuration.
</p>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>filterAttribute</i>
</td>
<td>A string value
</td>
<td>runtime
</td>
<td>The name of the attribute to match
</td></tr>
<tr>
<td><i>filterExpression</i>
</td>
<td>A string value
</td>
<td>runtime
</td>
<td>The regular expression to match the attribute value against
</td></tr></table>
<h3><span class="mw-headline" id="Example_4">Example</span></h3>
<p>To get only those records in the <tt>textRecords</tt> BPEL variable that have a MimeType starting with <tt>text</tt> something like this could be used:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;invokeFilterPipelet&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.FilterPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;textRecords&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;filterAttribute&quot;</span><span class="re2">&gt;</span></span>MimeType<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;filterExpression&quot;</span><span class="re2">&gt;</span></span>text/.+<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.HtmlToTextPipelet">org.eclipse.smila.processing.pipelets.HtmlToTextPipelet</span></h2>
<h3><span class="mw-headline" id="Description_2">Description</span></h3>
<p>Extract plain text and metadata from an HTML document from an attribute or attachment of each record and writes the results to configurable attributes or attachments.
</p><p>The pipelet uses the CyberNeko HTML parser <a rel="nofollow" class="external text" href="http://nekohtml.sourceforge.net/">NekoHTML</a> to parse HTML documents.
</p>
<h3><span class="mw-headline" id="Configuration_6">Configuration</span></h3>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>inputType</i>
</td>
<td>String&#160;: <i>ATTACHMENT, ATTRIBUTE</i>
</td>
<td>runtime
</td>
<td>Defines whether the HTML input is found in an attachment or in an attribute of the record
</td></tr>
<tr>
<td><i>outputType</i>
</td>
<td>String&#160;: <i>ATTACHMENT, ATTRIBUTE</i>
</td>
<td>runtime
</td>
<td>Defines whether the plain text should be stored in an attachment or in an attribute of the record
</td></tr>
<tr>
<td><i>inputName</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>Name of input attachment or path to input attribute (process literals of attribute)
</td></tr>
<tr>
<td><i>outputName</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>Name of output attachment or path to output attribute for plain text (store result as literals of attribute)
</td></tr>
<tr>
<td><i>defaultEncoding</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>Optional, default encoding to apply to documents when not specified in the documents themselves
</td></tr>
<tr>
<td><i>removeContentTags</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>Comma-separated list of HTML tags (case-insensitive) for which the complete content should be removed from the resulting plain text. If not set, it defaults to <i>"applet,frame,object,script,style"</i>. If the value is set, you must add the default tags explicitly to have their contents removed, too.
</td></tr>
<tr>
<td><i>keepCdata</i>
</td>
<td>Boolean
</td>
<td>runtime
</td>
<td>Optional, whether text in CDATA sections should be kept during extraction (true) or removed (false).
</td></tr>
<tr>
<td><i>meta:&lt;name&gt;</i>
</td>
<td>String: attribute path
</td>
<td>init
</td>
<td>Store the content of the <tt>&lt;META&gt;</tt> tag with <i>name="&lt;name&gt;"</i> (case insensitive) to the attribute named as the value of the property. E.g. a property named <i>"meta:author"</i> with value "authors" causes the content attributes of <tt>&lt;META name="author" content="..."&gt;</tt> tags to be stored in the attribute <i>authors</i> of the respective record.
</td></tr>
<tr>
<td><i>tag:title</i>
</td>
<td>String: attribute path
</td>
<td>init
</td>
<td>Store the content of the <tt>&lt;TITLE&gt;</tt> tag with to the attribute named as the value of the property.
</td></tr></table>
<h3><span class="mw-headline" id="Example_5">Example</span></h3>
<p>This configuration extracts plain text from the HTML document in attachment <i>"html"</i> and stores the results to the attribute <i>"text"</i>. It removes the complete content of heading tags <tt>&lt;h1&gt;, ..., &lt;h4&gt;</tt>. In addition to that, it looks for <tt>&lt;meta&gt;</tt> tags with names <i>"author"</i> and <i>"keywords"</i> and stores their contents in attributes <i>"authors"</i> and <i>"keywords"</i>, respectively:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;invokeHtml2Txt&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.HtmlToTextPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;inputType&quot;</span><span class="re2">&gt;</span></span>ATTACHMENT<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputType&quot;</span><span class="re2">&gt;</span></span>ATTRIBUTE<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;inputName&quot;</span><span class="re2">&gt;</span></span>html<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputName&quot;</span><span class="re2">&gt;</span></span>text<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;defaultEncoding&quot;</span><span class="re2">&gt;</span></span>UTF-8<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;meta:author&quot;</span><span class="re2">&gt;</span></span>author<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;meta:keywords&quot;</span><span class="re2">&gt;</span></span>keywords<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;meta:title&quot;</span><span class="re2">&gt;</span></span>title<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;removeContentTags&quot;</span><span class="re2">&gt;</span></span>h1,h2,h3,h4<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.CopyPipelet">org.eclipse.smila.processing.pipelets.CopyPipelet</span></h2>
<h3><span class="mw-headline" id="Description_3">Description</span></h3>
<p>This pipelet can be used to copy or move attribute values to other attributes or to copy or move a string value between attributes and/or attachments. It suppoprts two execution modes:
</p>
<ul>
<li> COPY: copy the value from the input attribute/attachment to the output attribute/attachment
</li>
<li> MOVE: same as COPY, but after that delete the value from the input attribute/attachment
</li>
</ul>
<p>When an attribute is copied to another attribute, the type remains the same. When copying an attachment to an attribute, a string value is created by assuming the the attachment is a text in UTF-8 encoding. When copying an attribute value to an attachment, the attribute must be single value which is interpreted as a string value and converted to a byte array using UTF-8 encoding.
</p>
<h3><span class="mw-headline" id="Configuration_7">Configuration</span></h3>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>inputType</i>
</td>
<td>String&#160;: <i>ATTACHMENT, ATTRIBUTE</i>
</td>
<td>runtime
</td>
<td>selects if the input is found in an attachment or attribute of the record
</td></tr>
<tr>
<td><i>outputType</i>
</td>
<td>String&#160;: <i>ATTACHMENT, ATTRIBUTE</i>
</td>
<td>runtime
</td>
<td>selects if output should be stored in an attachment or attribute of the record
</td></tr>
<tr>
<td><i>inputName</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>name of input attachment or input attribute
</td></tr>
<tr>
<td><i>outputName</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td> name of output attachment or output attribute
</td></tr>
<tr>
<td><i>mode</i>
</td>
<td>String&#160;: <i>COPY, MOVE</i>
</td>
<td>runtime
</td>
<td> execution mode. Copy the value or move (copy and delete) the value. Default is COPY.
</td></tr>
</table>
<h3><span class="mw-headline" id="Example_6">Example</span></h3>
<p>This configuration shows how to copy the value of attachment 'Content' into the attribute 'TextContent':
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc-1">&lt;!-- copy txt from attachment to attribute --&gt;</span>
<span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;invokeCopyContent&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.CopyPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;inputType&quot;</span><span class="re2">&gt;</span></span>ATTACHMENT<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputType&quot;</span><span class="re2">&gt;</span></span>ATTRIBUTE<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;inputName&quot;</span><span class="re2">&gt;</span></span>Content<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputName&quot;</span><span class="re2">&gt;</span></span>TextContent<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;mode&quot;</span><span class="re2">&gt;</span></span>COPY<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.SubAttributeExtractorPipelet">org.eclipse.smila.processing.pipelets.SubAttributeExtractorPipelet</span></h2>
<h3><span class="mw-headline" id="Description_4">Description</span></h3>
<p>Extracts literal values from an attribute that has a nested map. The attributes in the nested map can have nested maps themselves. To address a attribute in the nested structure, a path needs to be specified. The pipelet supports different execution modes:
</p>
<ul>
<li>FIRST: selects only the first literal of the specified attribute
</li>
<li>LAST: selects only the last literal of the specified attribute
</li>
<li>ALL_AS_LIST: selects all literal values of the specified attribute and returns a list
</li>
<li>ALL_AS_ONE: selects all literal values of the specified attribute and concatenates them to a single string, using a separator (default is blank)
</li>
</ul>
<p>This pipelet works only on attributes, not on attachments!
</p><p><b>Note</b>:
If the maps on the path are nested in sequences, the pipelet uses the first element of such a sequence.
</p>
<h3><span class="mw-headline" id="Configuration_8">Configuration</span></h3>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>inputPath</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>the path to the input attribute with Literals
</td></tr>
<tr>
<td><i>outputPath</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>the name of the attribute to store the extracted value(s) as Literals in (not a path, only a top-level attribute, currently)
</td></tr>
<tr>
<td><i>mode</i>
</td>
<td>String&#160;: <i>FIRST, LAST, ALL_AS_LIST, ALL_AS_ONE</i>
</td>
<td>runtime
</td>
<td> execution mode. See above for details.
</td></tr>
<tr>
<td><i>separator</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td> the separation string used for mode ALL_AS_ONE. Default is a blank
</td></tr>
</table>
<h3><span class="mw-headline" id="Example_7">Example</span></h3>
<p>This configuration can be applied to records provided by the FeedAgent. It shows how to access the subattribute 'Value' of attribute 'Contents', concatenating all values to one:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc-1">&lt;!-- extract content --&gt;</span>
<span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;extract content&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.SubAttributeExtractorPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;inputPath&quot;</span><span class="re2">&gt;</span></span>Contents/Value<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputPath&quot;</span><span class="re2">&gt;</span></span>Content<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;mode&quot;</span><span class="re2">&gt;</span></span>ALL_AS_ONE<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.ReplacePipelet">org.eclipse.smila.processing.pipelets.ReplacePipelet</span></h2>
<h3><span class="mw-headline" id="Description_5">Description</span></h3>
<p>Searches for one or more patterns in the literal value of an attribute and substitutes the found occurrences by the configured replacements.
</p><p>You can choose from different matching types:
</p>
<ul>
<li> <i>entity</i>: Every pattern is matched against the whole attribute value (with respect to the <i>ignoreCase</i> property) and the first matching pattern defines the new value of the attribute. If no pattern matches, the result is the current value of the attribute.
</li>
<li> <i>substring</i>: All patterns that are part of the attribute value are replaced.
</li>
<li> <i>regexp</i>: Interpret all patterns as <a rel="nofollow" class="external text" href="http://en.wikipedia.org/wiki/Regular_expression">regular expression</a>, see <a rel="nofollow" class="external text" href="http://docs.oracle.com/javase/6/docs/api/java/util/regex/Matcher.html#replaceAll(java.lang.String)">Matcher#replaceAll(String)</a>
</li>
</ul>
<p>This pipelet works only on attributes, not on attachments!
</p>
<h3><span class="mw-headline" id="Configuration_9">Configuration</span></h3>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>inputAttribute</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>the name of the attribute that contains the literal to search in
</td></tr>
<tr>
<td><i>outputAttribute</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>the name of the attribute to store the result value as string, defaults to the input attribute
</td></tr>
<tr>
<td><i>type</i>
</td>
<td>String&#160;: <i>entity</i>, <i>substring</i>, <i>regexp</i>
</td>
<td>init
</td>
<td>Identifies the type of the pattern, see above for details. Defaults to <i>substring</i>.
</td></tr>
<tr>
<td><i>ignoreCase</i>
</td>
<td>Boolean
</td>
<td>init
</td>
<td>indicates that the case is ignored when matching patterns, defaults to <i>false</i>.
</td></tr>
<tr>
<td><i>mapping</i>
</td>
<td>Map
</td>
<td>init
</td>
<td>A mapping of multiple patterns and replacements. Each key is a pattern and its value the replacement.
</td></tr>
<tr>
<td><i>pattern</i>
</td>
<td>String
</td>
<td>init
</td>
<td>the pattern to apply to the literal value (see above for a description of possible types), required if no mapping is given
</td></tr>
<tr>
<td><i>replacement</i>
</td>
<td>String
</td>
<td>init
</td>
<td>the substitution string used to replace all occurrences of the pattern, defaults to the empty string
</td></tr>
</table>
<h3><span class="mw-headline" id="Examples">Examples</span></h3>
<p>This configuration can be used to map language ids to their label:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;set language label&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.ReplacePipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;inputAttribute&quot;</span><span class="re2">&gt;</span></span>Language<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputAttribute&quot;</span><span class="re2">&gt;</span></span>LanguageLabel<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;type&quot;</span><span class="re2">&gt;</span></span>entity<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;ignoreCase&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;boolean&quot;</span><span class="re2">&gt;</span></span>true<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Map</span> <span class="re0">key</span>=<span class="st0">&quot;mapping&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;de&quot;</span><span class="re2">&gt;</span></span>German<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;en&quot;</span><span class="re2">&gt;</span></span>English<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;es&quot;</span><span class="re2">&gt;</span></span>Spanish<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;fr&quot;</span><span class="re2">&gt;</span></span>French<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
...
<span class="sc3"><span class="re1">&lt;/rec:Map<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<p>This configuration can be used to cut the time information from a timestamp:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;cut time&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.ReplacePipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;inputAttribute&quot;</span><span class="re2">&gt;</span></span>ModificationTime<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputAttribute&quot;</span><span class="re2">&gt;</span></span>ModificationDate<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;type&quot;</span><span class="re2">&gt;</span></span>regexp<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;pattern&quot;</span><span class="re2">&gt;</span></span>[T ].*<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;replacement&quot;</span><span class="re2">&gt;</span><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.ScriptPipelet">org.eclipse.smila.processing.pipelets.ScriptPipelet</span></h2>
<h3><span class="mw-headline" id="Description_6">Description</span></h3>
<p>Executes a script for each record.
</p><p>For execution the <a rel="nofollow" class="external text" href="http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform">Java Scripting API (JSR 223)</a> is responsible - thus any compatible scripting engine can be used. JavaScript is available "out of the box" and the default script language.
</p><p>The context of the script will contain four variables:
</p>
<ul>
<li> <i>blackboard</i>: a reference to the <a rel="nofollow" class="external text" href="http://build.eclipse.org/rt/smila/javadoc/current/org/eclipse/smila/blackboard/Blackboard.html">blackboard</a>
</li>
<li> <i>id</i>: the ID of the current record
</li>
<li> <i>record</i>: the <a rel="nofollow" class="external text" href="http://build.eclipse.org/rt/smila/javadoc/current/org/eclipse/smila/datamodel/AnyMap.html">metadata</a> of the current record
</li>
<li> <i>results</i>: a slightly modified version of a <a rel="nofollow" class="external text" href="http://build.eclipse.org/rt/smila/javadoc/current/org/eclipse/smila/processing/util/ResultCollector.html">result collector</a> that provides methods to add a new record id to the list of result ids (<i>results.addResult('...id...')</i>) and to drop the current record from the same list (<i>results.excludeCurrentRecord()</i>)
</li>
<li> <i>parameterAccessor</i>: the <a rel="nofollow" class="external text" href="http://build.eclipse.org/rt/smila/javadoc/current/org/eclipse/smila/processing/parameters/ParameterAccessor.html">ParameterAccessor</a> instance for access to the configuration (e.g. <i>parameterAccessor.getParameterAny("configMap").asMap().getLongValue("longValue")</i>).
</li>
</ul>
<p>Please be aware that the intention of this pipelet is to write pipelines fast, but not to write fast pipelines - the script is parsed for every record. Don't use it for production environments where performance matters, but use it to develop an algorithm that you can put into <a href="../Development_Guidelines/How_to_write_a_Pipelet.html" title="SMILA/Development Guidelines/How to write a Pipelet" class="mw-redirect">your own pipelet</a>.
</p>
<h3><span class="mw-headline" id="Configuration_10">Configuration</span></h3>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>type</i>
</td>
<td>String
</td>
<td>init
</td>
<td>the mime type of the scripting language, defaults to "text/javascript"
</td></tr>
<tr>
<td><i>scriptFile</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>the path of the file that contains the script - modifications of this file are observed on every execution of the pipelet
</td></tr>
<tr>
<td><i>script</i>
</td>
<td>String
</td>
<td>init
</td>
<td>The "inline" script, required unless <i>scriptFile</i> is specified (ignored in that case)
</td></tr>
<tr>
<td><i>resultAttribute</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>The name of an attribute that will receive the result of the script (usually the result of the last expression)
</td></tr>
</table>
<h3><span class="mw-headline" id="Examples_2">Examples</span></h3>
<p>This configuration can be used to concatenate the values of two attributes and save the result into a third one:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;create full name&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.ScriptPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;script&quot;</span><span class="re2">&gt;</span></span>record.get(&quot;firstName&quot;) + &quot; &quot; + record.get(&quot;lastName&quot;)<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;resultAttribute&quot;</span><span class="re2">&gt;</span></span>fullName<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<p>This configuration can be used to execute a java script file from $SMILA_PATH$/configuration/example.js:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;execute script&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.ScriptPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;scriptFile&quot;</span><span class="re2">&gt;</span></span>configuration/example.js<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.ExecPipelet">org.eclipse.smila.processing.pipelets.ExecPipelet</span></h2>
<h3><span class="mw-headline" id="Description_7">Description</span></h3>
<p>Executes an external program for each record.
</p><p>This pipelet may be used to integrate native programs into the pipeline.
</p><p><b>Attention</b>: This pipelet may lead to security issues! Please be aware that although one can not change the executed command during runtime (as this parameter is only evaluated at initialization time), it is possible to change the arguments and input of the command using values in the processed record. Every "pipeline developer" should ensure that only arguments in the expected value range are processed (especially if the program is allowing files from the file system as arguments).
</p>
<h3><span class="mw-headline" id="Configuration_11">Configuration</span></h3>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>command</i>
</td>
<td>String
</td>
<td>init
</td>
<td>The program to execute (including its path in the file system).
</td></tr>
<tr>
<td><i>directory</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>The (optional) working directory for the command. The SMILA directory is used if not given.
</td></tr>
<tr>
<td><i>parameters</i>
</td>
<td>Sequence of strings
</td>
<td>runtime
</td>
<td>The optional parameters given to the program (ignored if the contents of the parameters attribute exists).
</td></tr>
<tr>
<td><i>parametersAttribute</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>The optional name of the attribute that contains the sequence of parameters given to the program.
</td></tr>
<tr>
<td><i>inputAttachment</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>The optional name of the attachment that contains the bytes to send as input for the program.
</td></tr>
<tr>
<td><i>outputAttachment</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>The optional name of the attachment that is filled with the standard output of the program.
</td></tr>
<tr>
<td><i>exitCodeAttribute</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>The name of the attribute that is filled with the exit code of the program.
</td></tr>
<tr>
<td><i>errorAttachment</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>The optional name of the attachment that is filled with the error output of the program.
</td></tr>
<tr>
<td><i>failOnError</i>
</td>
<td>Either a boolean or a sequence of strings
</td>
<td>runtime
</td>
<td>Indicates to mark a record as failed if the program returns an error code. Either as a sequence of exit code ranges or as a boolean where "true" means that everything except 0 is an error code. Defaults to false.
</td></tr>
</table>
<h3><span class="mw-headline" id="Examples_3">Examples</span></h3>
<p>This configuration can be used to execute FFMPEG for transformation of an MP3 input file into a WAV output file:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;ConvertMP3&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.ExecPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;command&quot;</span><span class="re2">&gt;</span></span>.../ffmpeg<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Seq</span> <span class="re0">key</span>=<span class="st0">&quot;parameters&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;rec:Val<span class="re2">&gt;</span></span></span>-i<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val<span class="re2">&gt;</span></span></span>.../example.mp3<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val<span class="re2">&gt;</span></span></span>-ar<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val<span class="re2">&gt;</span></span></span>16000<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val<span class="re2">&gt;</span></span></span>.../example.wav<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/rec:Seq<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;failOnError&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;boolean&quot;</span><span class="re2">&gt;</span></span>true<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.MimeTypeIdentifyPipelet">org.eclipse.smila.processing.pipelets.MimeTypeIdentifyPipelet</span></h2>
<h3><span class="mw-headline" id="Description_8">Description</span></h3>
<p>This pipelet is used to identify the MIME type of a document.
It uses an <tt><a href="MimeTypeIdentifier.html" title="SMILA/Documentation/MimeTypeIdentifier"> org.eclipse.smila.processing.pipelets.mimetype.MimeTypeIdentifier</a></tt> service to perform the actual identification of the MIME type. Depending on the specified properties, the MIME type is detected from the file content, from the file extension, or from both. If the identification does not return a MIME type - and if configured accordingly - the service will search the metadata for this information. The identified MIME type is then stored to an attribute in the record.
</p>
<h3><span class="mw-headline" id="Configuration_12">Configuration</span></h3>
<p>The pipelet is configured using the <tt>&lt;configuration&gt;</tt> section inside the <tt>&lt;invokePipelet&gt;</tt> activity of the corresponding BPEL file. It provides the following properties:
</p>
<table border="1">
<tr>
<th>Property</th>
<th>Type</th>
<th>Read Type</th>
<th>Usage</th>
<th>Description
</th></tr>
<tr>
<td><i>FileExtensionAttribute</i></td>
<td>String</td>
<td>init</td>
<td>Optional</td>
<td>Name of the attribute containing the file extension
</td></tr>
<tr>
<td><i>ContentAttachment</i></td>
<td>String</td>
<td>init</td>
<td>Optional</td>
<td>Name of the attachment containing the file content
</td></tr>
<tr>
<td><i>MetaDataAttribute</i></td>
<td>String</td>
<td>init</td>
<td>Optional</td>
<td>Name of the attribute containing metadata information, e.g. a Web Crawler returns a response header containing applicable MIME type information
</td></tr>
<tr>
<td><i>MimeTypeAttribute</i></td>
<td>String</td>
<td>init</td>
<td>Required</td>
<td>Name of the attribute to store the identified MIME type to
</td></tr></table>
<p>Note that at least one of the properties <i>FileExtensionAttribute</i>, <i>ContentAttachment</i>, and <i>MetaDataAttribute</i> must be specified!
</p>
<h3><span class="mw-headline" id="Example_8">Example</span></h3>
<p>The following example is used in the SMILA example application to identify the MIME types of documents that are delivered by the File System Crawler or Web Crawler.
</p><p><b>addpipeline.bpel</b>
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;detect MimeType&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.MimeTypeIdentifyPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;FileExtensionAttribute&quot;</span><span class="re2">&gt;</span></span>Extension<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;MetaDataAttribute&quot;</span><span class="re2">&gt;</span></span>MetaData<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;MimeTypeAttribute&quot;</span><span class="re2">&gt;</span></span>MimeType<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<p><br />
</p>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.LanguageIdentifyPipelet">org.eclipse.smila.processing.pipelets.LanguageIdentifyPipelet</span></h2>
<h3><span class="mw-headline" id="Description_9">Description</span></h3>
<p>This pipelet identifies the language of textual input and stores the returned ISO 639 language code to some target attribute. It uses an <tt>org.eclipse.smila.common.language.LanguageIdentifier</tt> service to perform the actual identification. If the identification does not return a language, the specified <tt>DefaultLanguage</tt> (or <tt>DefaultAlternativeName</tt>) is returned. If no defaults are specified, no value is set.
</p><p>The pipelet returns the detected language as an ISO 639 code. Where you need special language tags in your application, the pipelet is able to produce
an alternative language code according to a configurable mapping. To define such a mapping, create the file <tt>SMILA/configuration/org.eclipse.smila.tika/languageMapping.properties</tt>. The following shows an exemplary mapping:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="text source-text"><pre class="de1">de=german
en=english
es=spanish
fi=finnish
fr=french</pre></div></div>
<p>The pipelet uses <a rel="nofollow" class="external text" href="http://tika.apache.org/">Apache Tika</a> technology for the actual language detection.
</p>
<h3><span class="mw-headline" id="Configuration_13">Configuration</span></h3>
<p>The pipelet is configured using the <tt>&lt;configuration&gt;</tt> section inside the <tt>&lt;invokePipelet&gt;</tt> activity of the corresponding BPEL file. It provides the following properties:
</p>
<table border="1">
<tr>
<th>Property</th>
<th>Type</th>
<th>Read Type</th>
<th>Usage</th>
<th>Description
</th></tr>
<tr>
<td><i>ContentAttribute</i></td>
<td>String</td>
<td>runtime</td>
<td>Required</td>
<td>Name of the attribute containing the text whose language should be identified
</td></tr>
<tr>
<td><i>LanguageAttribute</i></td>
<td>String</td>
<td>runtime</td>
<td>Optional</td>
<td>Name of the attribute to store the code of the identified language to
</td></tr>
<tr>
<td><i>DefaultLanguage</i></td>
<td>String</td>
<td>runtime</td>
<td>Optional</td>
<td>Language code to set if no language could be detected. If not set and no language could be identified, the <tt>LanguageAttribute</tt> attribute remains empty.
</td></tr>
<tr>
<td><i>AlternativeNameAttribute</i></td>
<td>String</td>
<td>runtime</td>
<td>Optional</td>
<td>Name of the attribute to store the alternative language code of the identified language to. The mapping defining this alternative code must be located in <tt>SMILA/configuration/org.eclipse.smila.tika/languageMapping.properties</tt> (see above).
</td></tr>
<tr>
<td><i>DefaultAlternativeName</i></td>
<td>String</td>
<td>runtime</td>
<td>Optional</td>
<td>Alternative language code to set if no language could be detected. If not set and no language could be identified, the <tt>DefaultAlternativeName</tt> attribute remains empty.
</td></tr>
<tr>
<td><i>UseCertainLanguagesOnly</i></td>
<td>Boolean</td>
<td>runtime</td>
<td>Optional</td>
<td>Boolean flag indicating whether to apply only those languages that were identified with a reasonable certainty (true) or all (false). Default is false.
</td></tr></table>
<p><br />
</p>
<h3><span class="mw-headline" id="Example_9">Example</span></h3>
<p>The following example could be used to identify the language of documents that are delivered by the File System Crawler or Web Crawler.
</p><p><b>addpipeline.bpel</b>
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;detect Language&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.LanguageIdentifyPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;ContentAttribute&quot;</span><span class="re2">&gt;</span></span>Content<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;LanguageAttribute&quot;</span><span class="re2">&gt;</span></span>Language<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;DefaultLanguage&quot;</span><span class="re2">&gt;</span></span>de<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;AlternativeNameAttribute&quot;</span><span class="re2">&gt;</span></span>AltLanguage<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;DefaultAlternativeName&quot;</span><span class="re2">&gt;</span></span>german<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;UseCertainLanguagesOnly&quot;</span><span class="re2">&gt;</span></span>false<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.FileReaderPipelet">org.eclipse.smila.processing.pipelets.FileReaderPipelet</span></h2>
<h3><span class="mw-headline" id="Description_10">Description</span></h3>
<p>This pipelet can be used to read content from a file and add it as an attachment.
</p>
<h3><span class="mw-headline" id="Configuration_14">Configuration</span></h3>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>pathAttribute</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>The name of the attribute with the path of the file to read from
</td></tr>
<tr>
<td><i>contentAttachment</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>The name of the attachment to store the content
</td></tr>
</table>
<h3><span class="mw-headline" id="Example_10">Example</span></h3>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc-1">&lt;!-- read from file and add attachment --&gt;</span>
<span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;invokeReadFile&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.FileReaderPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;pathAttribute&quot;</span><span class="re2">&gt;</span></span>path<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;contentAttachment&quot;</span><span class="re2">&gt;</span></span>content<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.FileWriterPipelet">org.eclipse.smila.processing.pipelets.FileWriterPipelet</span></h2>
<h3><span class="mw-headline" id="Description_11">Description</span></h3>
<p>This pipelet can be used to write the content of an attachment to a file.
</p><p>If the attachment does not exist a warning is logged, but the record will not be dropped.
</p>
<h3><span class="mw-headline" id="Configuration_15">Configuration</span></h3>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>pathAttribute</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>The name of the attribute with the path of the target file
</td></tr>
<tr>
<td><i>contentAttachment</i>
</td>
<td>String
</td>
<td>runtime
</td>
<td>The name of the attachment to write to the file
</td></tr>
<tr>
<td><i>append</i>
</td>
<td>Boolean
</td>
<td>runtime
</td>
<td>Indicates to append the attachment to the file (if it exists already), defaults to false
</td></tr>
</table>
<h3><span class="mw-headline" id="Example_11">Example</span></h3>
<p>This example saves all bytes of the attachment "content" to the file path that is contained in the attribute "path".
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;writeFile&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.FileWriterPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;pathAttribute&quot;</span><span class="re2">&gt;</span></span>path<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;contentAttachment&quot;</span><span class="re2">&gt;</span></span>content<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.PushRecordsPipelet">org.eclipse.smila.processing.pipelets.PushRecordsPipelet</span></h2>
<h3><span class="mw-headline" id="Description_12">Description</span></h3>
<p>Sends all current records to another (asynchronous) job.
</p><p>The records are not removed from the pipeline - thus a following pipelet in the current pipeline will process the records as well.
</p>
<h3><span class="mw-headline" id="Configuration_16">Configuration</span></h3>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>type</i>
</td>
<td>String
</td>
<td>init
</td>
<td>The name of the target job.
</td></tr>
</table>
<h3><span class="mw-headline" id="Example_12">Example</span></h3>
<p>This example sends all current records to the job "TheOtherJob".
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;callJob&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.PushRecordsPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;job&quot;</span><span class="re2">&gt;</span></span>TheOtherJob<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.JSONReaderPipelet">org.eclipse.smila.processing.pipelets.JSONReaderPipelet</span></h2>
<h3><span class="mw-headline" id="Description_13">Description</span></h3>
<p>Fills attributes of the record from a JSON string.
</p><p>It is not possible to overwrite the record id of the record, even if a key "_recordid" exists in the JSON string.
</p>
<h3><span class="mw-headline" id="Configuration_17">Configuration</span></h3>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>inputType</i>
</td>
<td>String&#160;: <i>ATTACHMENT, ATTRIBUTE</i>
</td>
<td>init
</td>
<td>selects if the JSON string is found in an attachment or attribute of the record
</td></tr>
<tr>
<td><i>inputName</i>
</td>
<td>String
</td>
<td>init
</td>
<td>name of the input attachment or input attribute that contains the JSON string
</td></tr>
<tr>
<td><i>outputAttribute</i>
</td>
<td>String
</td>
<td>init
</td>
<td>the optional name of the attribute in the record where the generated object is put into. If no attribute is specified and the object is a map, all contained attributes are written to the current record.
</td></tr>
</table>
<h3><span class="mw-headline" id="Examples_4">Examples</span></h3>
<p>The following examples use this input object:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1"><span class="br0">&#123;</span> <span class="st0">&quot;jsonString&quot;</span><span class="sy0">:</span> <span class="st0">&quot;{<span class="es0">\&quot;</span>attribute1<span class="es0">\&quot;</span>: <span class="es0">\&quot;</span>value1<span class="es0">\&quot;</span>}&quot;</span> <span class="br0">&#125;</span></pre></div></div>
<p><br />
This example unwraps the contents of the attribute "jsonString" into the attribute "jsonObject":
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;readJSON&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.JSONReaderPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;inputType&quot;</span><span class="re2">&gt;</span></span>ATTRIBUTE<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;inputName&quot;</span><span class="re2">&gt;</span></span>jsonString<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputAttribute&quot;</span><span class="re2">&gt;</span></span>jsonString<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<p>The result would be:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1"><span class="br0">&#123;</span>
<span class="st0">&quot;jsonString&quot;</span><span class="sy0">:</span> <span class="st0">&quot;{<span class="es0">\&quot;</span>attribute1<span class="es0">\&quot;</span>: <span class="es0">\&quot;</span>value1<span class="es0">\&quot;</span>}&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;jsonObject&quot;</span><span class="sy0">:</span> <span class="br0">&#123;</span>
<span class="st0">&quot;attribute1&quot;</span><span class="sy0">:</span> <span class="st0">&quot;value1&quot;</span>
<span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></div></div>
<p><br />
This example unwraps the contents of the attribute "jsonString" into the object itself:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;readJSON&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.JSONReaderPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;inputType&quot;</span><span class="re2">&gt;</span></span>ATTRIBUTE<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;inputName&quot;</span><span class="re2">&gt;</span></span>jsonString<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<p>The result would be:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1"><span class="br0">&#123;</span>
<span class="st0">&quot;jsonString&quot;</span><span class="sy0">:</span> <span class="st0">&quot;{<span class="es0">\&quot;</span>attribute1<span class="es0">\&quot;</span>: <span class="es0">\&quot;</span>value1<span class="es0">\&quot;</span>}&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;attribute1&quot;</span><span class="sy0">:</span> <span class="st0">&quot;value1&quot;</span>
<span class="br0">&#125;</span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.JSONWriterPipelet">org.eclipse.smila.processing.pipelets.JSONWriterPipelet</span></h2>
<h3><span class="mw-headline" id="Description_14">Description</span></h3>
<p>Writes some or all attributes of the record into a JSON string.
</p>
<h3><span class="mw-headline" id="Configuration_18">Configuration</span></h3>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>inputAttributes</i>
</td>
<td>String/Sequence of String
</td>
<td>init
</td>
<td>the names of the attributes in the record that contain the objects to write into JSON. If nothing is given, the whole record is used. If only a string is given, the content of that attribute is used.
</td></tr>
<tr>
<td><i>outputType</i>
</td>
<td>String&#160;: <i>ATTACHMENT, ATTRIBUTE</i>
</td>
<td>init
</td>
<td>selects if the JSON string is written to an attachment or attribute of the record
</td></tr>
<tr>
<td><i>outputName</i>
</td>
<td>String
</td>
<td>init
</td>
<td>name of the target attachment or attribute
</td></tr>
<tr>
<td><i>printPretty</i>
</td>
<td>Boolean
</td>
<td>init
</td>
<td>Indicates to format the output for better readability, defaults to true.
</td></tr>
</table>
<h3><span class="mw-headline" id="Examples_5">Examples</span></h3>
<p>This example writes the content of attribute "a1" into the attribute "value" without any whitespaces:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;writeJSON&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.JSONWriterPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;inputAttributes&quot;</span><span class="re2">&gt;</span></span>a1<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputType&quot;</span><span class="re2">&gt;</span></span>ATTRIBUTE<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputName&quot;</span><span class="re2">&gt;</span></span>value<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;printPretty&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;boolean&quot;</span><span class="re2">&gt;</span></span>false<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1">input <span class="sy0">:</span> <span class="br0">&#123;</span> <span class="st0">&quot;a1&quot;</span><span class="sy0">:</span> <span class="br0">&#91;</span> <span class="nu0">1</span> <span class="br0">&#93;</span><span class="sy0">,</span> <span class="st0">&quot;a2&quot;</span><span class="sy0">:</span> <span class="nu0">2</span> <span class="br0">&#125;</span>
result <span class="sy0">:</span> <span class="br0">&#123;</span> <span class="st0">&quot;a1&quot;</span><span class="sy0">:</span> <span class="br0">&#91;</span> <span class="nu0">1</span> <span class="br0">&#93;</span><span class="sy0">,</span> <span class="st0">&quot;a2&quot;</span><span class="sy0">:</span> <span class="nu0">2</span><span class="sy0">,</span> <span class="st0">&quot;value&quot;</span><span class="sy0">:</span> <span class="st0">&quot;[1]&quot;</span> <span class="br0">&#125;</span></pre></div></div>
<p>This example appends the whole object to the file "records.log":
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;createJSONLogEntry&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.JSONWriterPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputType&quot;</span><span class="re2">&gt;</span></span>ATTACHMENT<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputName&quot;</span><span class="re2">&gt;</span></span>jsonLog<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;createJSONFileName&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.SetValuePipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputAttribute&quot;</span><span class="re2">&gt;</span></span>jsonFile<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;value&quot;</span><span class="re2">&gt;</span></span>records.log<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;appendToJSONLog&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.FileWriterPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;pathAttribute&quot;</span><span class="re2">&gt;</span></span>jsonFile<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;contentAttachment&quot;</span><span class="re2">&gt;</span></span>jsonLog<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;append&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;boolean&quot;</span><span class="re2">&gt;</span></span>true<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.DocumentSplitterPipelet">org.eclipse.smila.processing.pipelets.DocumentSplitterPipelet</span></h2>
<p>Splits a single input document into multiple separate output records. Just think of a book and its pages as an example. The splitter copies the attribute values of the document to each record. However, if an attribute exists both in the area of the enclosing document and in a sub record, the resulting record will carry its own attribute value instead of the document's one. In short: record values beat document values.
The functionality of document splitting is only applied if the input record carries the given <i>partsAttribute</i> (see section "Configuration" below). If the input record does not carry that specific attribute, it is passed unchanged. If the attribute exists, yet misses any values, it will be removed.
</p><p>If the splitting functionality is applied, each output record will receive an additional "_documentId" attribute containing the "_recordid" of the enclosing document. The effective "_recordid" of the output records is then an aggregate of "_documentId" and the page number joined via the string "###". Example:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1"> <span class="br0">&#123;</span>
<span class="st0">&quot;_documentId&quot;</span><span class="sy0">:</span> <span class="st0">&quot;book.pdf&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;_recordid&quot;</span><span class="sy0">:</span> <span class="st0">&quot;book.pdf###0&quot;</span><span class="sy0">,</span>
...
<span class="br0">&#125;</span></pre></div></div>
<p><br />
</p>
<h3><span class="mw-headline" id="Configuration_19">Configuration</span></h3>
<p>The configuration property is read from the pipelet configuration.
</p>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>partsAttribute</i>
</td>
<td>A string value
</td>
<td>runtime
</td>
<td>The name of the attribute where the single pages of the document are contained.
</td></tr></table>
<h3><span class="mw-headline" id="Example_13">Example</span></h3>
<p>Imagine this example input to be split by the pipelet:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1"><span class="br0">&#123;</span>
<span class="st0">&quot;_recordid&quot;</span><span class="sy0">:</span> <span class="st0">&quot;document0.pdf&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;author&quot;</span><span class="sy0">:</span> <span class="st0">&quot;john maynard keynes&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;subPages&quot;</span><span class="sy0">:</span>
<span class="br0">&#91;</span>
<span class="br0">&#123;</span>
<span class="st0">&quot;content&quot;</span><span class="sy0">:</span> <span class="st0">&quot;public spending must be pro-cyclical&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;author&quot;</span><span class="sy0">:</span> <span class="st0">&quot;adam smith&quot;</span>
<span class="br0">&#125;</span><span class="sy0">,</span>
<span class="br0">&#123;</span>
<span class="st0">&quot;content&quot;</span><span class="sy0">:</span> <span class="st0">&quot;public spending must be counter-cyclical&quot;</span>
<span class="br0">&#125;</span>
<span class="br0">&#93;</span>
<span class="br0">&#125;</span></pre></div></div>
<p>The configuration must be as follows then:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;splitDocument&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.DocumentSplitterPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;result&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;result&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;partsAttribute&quot;</span><span class="re2">&gt;</span></span>subPages<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<p>The output will be two separate records:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1"><span class="br0">&#91;</span>
<span class="br0">&#123;</span>
<span class="st0">&quot;_recordid&quot;</span><span class="sy0">:</span> <span class="st0">&quot;document0.pdf###0&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;_documentId&quot;</span><span class="sy0">:</span> <span class="st0">&quot;document0.pdf&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;author&quot;</span><span class="sy0">:</span> <span class="st0">&quot;adam smith&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;content&quot;</span><span class="sy0">:</span> <span class="st0">&quot;public spending must be pro-cyclical&quot;</span>
<span class="br0">&#125;</span><span class="sy0">,</span>
<span class="br0">&#123;</span>
<span class="st0">&quot;_recordid&quot;</span><span class="sy0">:</span> <span class="st0">&quot;document0.pdf###1&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;_documentId&quot;</span><span class="sy0">:</span> <span class="st0">&quot;document0.pdf&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;author&quot;</span><span class="sy0">:</span> <span class="st0">&quot;john maynard keynes&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;content&quot;</span><span class="sy0">:</span> <span class="st0">&quot;public spending must be counter-cyclical&quot;</span>
<span class="br0">&#125;</span>
<span class="br0">&#93;</span></pre></div></div>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.CodecPipelet">org.eclipse.smila.processing.pipelets.CodecPipelet</span></h2>
<p>Decodes encoded strings from attributes to binary attachments.
E.g. if you want to upload one or more binary data attachments into SMILA and must (for whatever reason) embed the data into the JSON record (or if you already got encoded content from another service and want to send it to SMILA for further processing), this pipelet will convert it for you and store the decoded binary data as attachments.
</p><p>Or if on the other hand you need the data from an attachment represented as a string in an attribute inside the JSON representation of the record's meta data, this pipelet can also do that for you.
</p>
<h3><span class="mw-headline" id="Decoding">Decoding</span></h3>
<p>The Input, if decoding, has to adhere to some syntactic restrictions, though.
</p><p>The attribute containing the one ore more attachments has to be a sequence of maps containing
</p>
<ul>
<li> the name of the attachment (key 'name')
</li>
<li> the encoded content as a string (key 'content')
</li>
</ul>
<p>The name of the attribute can be configured and defaults to '_attachments'.
</p><p>Look at the following snippet that explains the JSON fragment for the decoding use case.
It contains two BASE64 encoded data-fragments that should be decoded and saved as binary attachments for further processing (e.g. transformation by the TikaPipelet):
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1"><span class="br0">&#123;</span>
<span class="st0">&quot;_attachments&quot;</span> <span class="sy0">:</span> <span class="br0">&#91;</span><span class="br0">&#123;</span>
<span class="st0">&quot;name&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;att1.pdf&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;content&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;VGhpcyBpcyB0aGUgZGVjb2RlZCBjb250ZW50Lg==&quot;</span>
<span class="br0">&#125;</span><span class="sy0">,</span> <span class="br0">&#123;</span>
<span class="st0">&quot;name&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;att2.docx&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;content&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;VGhpcyBpcyB0aGUgZGVjb2RlZCBjb250ZW50Lg==&quot;</span>
<span class="br0">&#125;</span>
<span class="br0">&#93;</span>
<span class="br0">&#125;</span></pre></div></div>
<p>The Pipelet it will
</p>
<ul>
<li> look for the "_attachments" attribute (if not configured to look for another attribute containing the encoded data),
</li>
<li> use BASE64 decoding (currently only BASE64 is supported),
</li>
<li> decode the encoded strings into two attachments "att1.pdf" and "att2.docx" containing the binary representation of the encoded strings
</li>
<li> if configured, remove the "_attachments" attribute from the record (since the content is stored as an attachment, this makes much sense)
</li>
</ul>
<h3><span class="mw-headline" id="Encoding">Encoding</span></h3>
<p>Consider the following case: you have a record with two binary attachments "att1.pdf" and "att2.docx", but you need for some special processing to provide the content in the metadata of the record, you can use the CodecPipelet to do so.
</p><p>When configuring the "encode" configuration property to 'true', the CodecPipelet will add the following attribute to the Record's metadata:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1"><span class="br0">&#123;</span>
<span class="st0">&quot;_attachments&quot;</span> <span class="sy0">:</span> <span class="br0">&#91;</span><span class="br0">&#123;</span>
<span class="st0">&quot;name&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;att1.pdf&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;content&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;VGhpcyBpcyB0aGUgZGVjb2RlZCBjb250ZW50Lg==&quot;</span>
<span class="br0">&#125;</span><span class="sy0">,</span> <span class="br0">&#123;</span>
<span class="st0">&quot;name&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;att2.docx&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;content&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;VGhpcyBpcyB0aGUgZGVjb2RlZCBjb250ZW50Lg==&quot;</span>
<span class="br0">&#125;</span>
<span class="br0">&#93;</span>
<span class="br0">&#125;</span></pre></div></div>
<p>The pipelet will (if "encode" is configured to 'true'):
</p>
<ul>
<li> use BASE64 encoding
</li>
<li> encode the two attachments "att1.pdf" and "att2.docx"
</li>
<li> put the encoded data as a string value into a map containing
<ul>
<li> the name of the attachment
</li>
<li> the encoded content
</li>
</ul>
</li>
<li> if configured, remove the attachments from the record
</li>
</ul>
<h3><span class="mw-headline" id="Configuration_20">Configuration</span></h3>
<p>The configuration property is read from the pipelet configuration.
</p>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Optional
</th>
<th>Description
</th></tr>
<tr>
<td><i>encodedContentAttribute</i>
</td>
<td>A string value
</td>
<td>runtime
</td>
<td>true
</td>
<td>The name of the attribute containing the encoded string represenation of the attachments. Default is "_attachments".
</td></tr>
<tr>
<td><i>codec</i>
</td>
<td>A string value
</td>
<td>runtime
</td>
<td>true
</td>
<td>The codec to use. Currently only BASE64 is supported. Default is "BASE64".
</td></tr>
<tr>
<td><i>encode</i>
</td>
<td>A boolean value
</td>
<td>runtime
</td>
<td>true
</td>
<td>If set to 'true' the pipelet encodes attachments to string attributes, if 'false' the pipelet decodes string attributes to attachments. Default is 'false'.
</td></tr>
<tr>
<td><i>removeInput</i>
</td>
<td>A boolean value
</td>
<td>runtime
</td>
<td>true
</td>
<td>If set to 'true' the pipelet removes the input (i.e. the attachments when encoding, or the "_attachments" attribute when decoding). Default is 'false'.
</td></tr></table>
<h3><span class="mw-headline" id="Example_14">Example</span></h3>
<p>Imagine this example input to be decoded by the pipelet and the encoded strings to be removed after conversion:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1"><span class="br0">&#123;</span>
<span class="st0">&quot;_recordid&quot;</span><span class="sy0">:</span> <span class="st0">&quot;document0&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;encodedAttachments&quot;</span> <span class="sy0">:</span> <span class="br0">&#91;</span><span class="br0">&#123;</span>
<span class="st0">&quot;name&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;att1.pdf&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;content&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;VGhpcyBpcyB0aGUgZGVjb2RlZCBjb250ZW50Lg==&quot;</span>
<span class="br0">&#125;</span><span class="sy0">,</span> <span class="br0">&#123;</span>
<span class="st0">&quot;name&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;att2.docx&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;content&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;VGhpcyBpcyB0aGUgZGVjb2RlZCBjb250ZW50Lg==&quot;</span>
<span class="br0">&#125;</span>
<span class="br0">&#93;</span>
<span class="br0">&#125;</span></pre></div></div>
<p>The configuration must be as follows then:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;decodeAttachments&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.CodecPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;result&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;result&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;encodedContentAttribute&quot;</span><span class="re2">&gt;</span></span>encodedAttachments<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;removeInput&quot;</span><span class="re2">&gt;</span></span>true<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div></div>
<p>The output record will have two attachments, but does not contain the encoded strings, any more:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1"><span class="br0">&#123;</span>
<span class="st0">&quot;_recordid&quot;</span><span class="sy0">:</span> <span class="st0">&quot;document0&quot;</span>
<span class="br0">&#125;</span>
<span class="sy0">+</span> <span class="br0">&#91;</span>att1.<span class="me1">pdf</span><span class="sy0">,</span> att2.<span class="me1">docx</span><span class="br0">&#93;</span></pre></div></div>
<p><br />
</p>
<h2><span class="mw-headline" id="org.eclipse.smila.processing.pipelets.StoreWriterPipelet">org.eclipse.smila.processing.pipelets.StoreWriterPipelet</span></h2>
<p>Pipelet that writes record(s) (as <a href="Data_Model_and_Serialization_Formats.html#BON_Binary_Object_Notation_Format" title="SMILA/Documentation/Data Model and Serialization Formats">BON</a>) to the given store by using the given object id. The objectId parameter must be set in each record separately if multiple records should be processed and stored. Otherwise they overwrite each other.
</p><p>See <a href="ObjectStore/Bundle_org.eclipse.smila.objectstore.filesystem.html" title="SMILA/Documentation/ObjectStore/Bundle org.eclipse.smila.objectstore.filesystem">here</a> for more information about the SMILA objectstore.
</p>
<h3><span class="mw-headline" id="Configuration_21">Configuration</span></h3>
<table border="1">
<tr>
<th>Property
</th>
<th>Type
</th>
<th>Read Type
</th>
<th>Description
</th></tr>
<tr>
<td><i>store</i>
</td>
<td>string (must be a valid store name)
</td>
<td>runtime
</td>
<td>The store name where the input record(s) should be stored.
</td></tr>
<tr>
<td><i>objectId</i>
</td>
<td>string (must be a valid object id)
</td>
<td>runtime
</td>
<td>The object id under which the input record(s) should be stored. Must be set in each record's parameters if multiple records should be processed."
</td></tr></table>
<h3><span class="mw-headline" id="Example_15">Example</span></h3>
<p>Sample pipelet configuration in BPEL:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;writeToStore&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.StoreWriterPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;store&quot;</span><span class="re2">&gt;</span></span>teststore<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;objectId&quot;</span><span class="re2">&gt;</span></span>path/id<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span></pre></div></div>
<p>Sample input records with their own object id:
</p>
<pre>
{
&quot;recordid&quot;: &quot;recId-1&quot;,
&quot;_parameters&quot;: {
&quot;objectId&quot;: &quot;objectId-1&quot;
}
...
}
{
&quot;recordid&quot;: &quot;recId-2&quot;,
&quot;_parameters&quot;: {
&quot;objectId&quot;: &quot;objectId-2&quot;
}
...
}
</pre>
<!--
NewPP limit report
CPU time usage: 0.448 seconds
Real time usage: 0.470 seconds
Preprocessor visited node count: 645/1000000
Preprocessor generated node count: 1080/1000000
Post‐expand include size: 0/2097152 bytes
Template argument size: 0/2097152 bytes
Highest expansion depth: 2/40
Expensive parser function count: 0/100
-->
<!-- Saved in parser cache with key my_wiki:pcache:idhash:15166-0!*!0!!en!*!* and timestamp 20150414154326 and revision id 373858
-->
</div>
<!-- catlinks -->
<div id='catlinks' class='catlinks'><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="http://wiki.eclipse.org/Special:Categories" title="Special:Categories">Categories</a>: <ul><li><a href="http://wiki.eclipse.org/Category:SMILA" title="Category:SMILA">SMILA</a></li><li><a href="http://wiki.eclipse.org/index.php?title=Category:SMILA/Pipelet&amp;action=edit&amp;redlink=1" class="new" title="Category:SMILA/Pipelet (page does not exist)">SMILA/Pipelet</a></li></ul></div></div> <!-- /catlinks -->
</div>
</div>
</div>
</div>
<!-- /maincontent -->
<!-- printfooter -->
<div class="printfooter">
Retrieved from "<a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets&amp;oldid=373858">http://wiki.eclipse.org/index.php?title=SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets&amp;oldid=373858</a>" </div>
<!-- /printfooter -->
<!-- debughtml -->
<!-- /debughtml -->
</div>
<!-- /bodyContent -->
</section>
<!-- /content -->
<!-- footer -->
</div> <section id="footer-contribution-info" style="border-top:1px solid #ccc;" class="footer-offset background-white margin-top-25"><div class="container text-center padding-top-10 padding-bottom-10"><p id="footercredit">This page was last modified 10:55, 18 November 2014 by <a href="http://wiki.eclipse.org/User:Andreas.weber.empolis.com" title="User:Andreas.weber.empolis.com">Andreas Weber</a>. Based on work by <a href="http://wiki.eclipse.org/index.php?title=User:Andreas.schank.empolis.com&amp;action=edit&amp;redlink=1" class="new" title="User:Andreas.schank.empolis.com (page does not exist)">Andreas Schank</a>, <a href="http://wiki.eclipse.org/index.php?title=User:Nadine.auslaender.empolis.com&amp;action=edit&amp;redlink=1" class="new" title="User:Nadine.auslaender.empolis.com (page does not exist)">Nadine Ausländer</a> and <a href="http://wiki.eclipse.org/index.php?title=User:Marco.strack.empolis.com&amp;action=edit&amp;redlink=1" class="new" title="User:Marco.strack.empolis.com (page does not exist)">Marco Strack</a> and <a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets&amp;action=credits" title="SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets">others</a>.</p><p id="footerviews">This page has been accessed 12,050 times.</p></div></section> </main> <!-- /#main-content-container-row -->
<p id="back-to-top" class="noprint hidden-print">
<a class="visible-xs" href="Bundle_org.eclipse.smila.processing.pipelets.html#top">Back to the top</a>
</p>
<footer role="contentinfo" class="noprint hidden-print">
<div class="container">
<div class="row">
<section id="footer-eclipse-foundation" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0">
<h2 class="section-title">Eclipse Foundation</h2>
<ul class="nav">
<li><a href="https://eclipse.org/org/">About us</a></li>
<li><a href="https://eclipse.org/org/foundation/contact.php">Contact Us</a></li>
<li><a href="https://eclipse.org/donate">Donate</a></li>
<li><a href="https://eclipse.org/org/documents/">Governance</a></li>
<li><a href="https://eclipse.org/artwork/">Logo and Artwork</a></li>
<li><a href="https://eclipse.org/org/foundation/directors.php">Board of Directors</a></li>
</ul>
</section>
<section id="footer-legal" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0">
<h2 class="section-title">Legal</h2>
<ul class="nav">
<li><a href="https://eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="https://eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="https://eclipse.org/legal/copyright.php">Copyright Agent</a></li>
<li><a href="https://eclipse.org/org/documents/epl-v10.php">Eclipse Public License </a></li>
<li><a href="https://eclipse.org/legal/">Legal Resources </a></li>
</ul>
</section>
<section id="footer-useful-links" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0">
<h2 class="section-title">Useful Links</h2>
<ul class="nav">
<li><a href="https://bugs.eclipse.org/bugs/">Report a Bug</a></li>
<li><a href="http://help.eclipse.org/">Documentation</a></li>
<li><a href="https://eclipse.org/contribute/">How to Contribute</a></li>
<li><a href="https://eclipse.org/mail/">Mailing Lists</a></li>
<li><a href="https://eclipse.org/forums/">Forums</a></li>
<li><a href="http://marketplace.eclipse.org/">Marketplace</a></li>
</ul>
</section>
<section id="footer-other" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0">
<h2 class="section-title">Other</h2>
<ul class="nav">
<li><a href="https://eclipse.org/ide/">IDE and Tools</a></li>
<li><a href="https://eclipse.org/projects">Community of Projects</a></li>
<li><a href="https://eclipse.org/org/workinggroups/">Working Groups</a></li>
</ul>
<ul class="list-inline social-media">
<li><a href="https://twitter.com/EclipseFdn"><i class="fa fa-twitter-square"></i></a></li>
<li><a href="https://plus.google.com/+Eclipse"><i class="fa fa-google-plus-square"></i></a></li>
<li><a href="https://www.facebook.com/eclipse.org"><i class="fa fa-facebook-square"></i> </a></li>
<li><a href="https://www.youtube.com/user/EclipseFdn"><i class="fa fa-youtube-square"></i></a></li>
</ul>
</section>
<div id="copyright" class="col-xs-offset-1 col-sm-14 col-md-24 col-md-offset-0">
<div>
<span><img src="http://eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-logo-bw-800x188.png" alt="Eclipse.org black and white logo" width="166" height="39" id="logo-eclipse-white"/></span>
<p id="copyright-text">Copyright &copy; 2014 The Eclipse Foundation. All Rights Reserved.</p>
</div>
</div>
<a href="Bundle_org.eclipse.smila.processing.pipelets.html#" class="scrollup">Back to the top</a>
</div>
</div>
</footer>
<script src="http://wiki.eclipse.org/skins/solstice/public/javascript/main.min.js"></script>
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-910670-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script> <!-- /footer -->
<script>/*<![CDATA[*/window.jQuery && jQuery.ready();/*]]>*/</script><script>if(window.mw){
mw.loader.state({"skins.solstice":"loading","site":"ready","user":"ready","user.groups":"ready"});
}</script>
<script src="http://wiki.eclipse.org/load.php?debug=false&amp;lang=en&amp;modules=skins.solstice&amp;only=scripts&amp;skin=solstice&amp;*"></script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.hidpi","mediawiki.page.ready","mediawiki.searchSuggest"],null,true);
}</script>
<script>if(window.mw){
mw.config.set({"wgBackendResponseTime":353});
}</script> </body>
</html>