<?xml version="1.0" encoding="UTF-8"?><MetamergeConfig Cycle="16" UUID="83d631d4-aa47-4bf5-948f-ef1a0dbdff39" created="Wed Feb 08 17:51:35 UTC 2012" createdBy="root" main="LookupInPasswd" modified="Wed Feb 08 19:41:27 UTC 2012" modifiedBy="root" project="ajf" version="7.1">
    
<AssemblyLine name="LookupInPasswd">
        <Settings/>
        <Hooks>
            <Hook name="prolog">
                <Name>prolog</Name>
                <Script><![CDATA[// Create an object to use as associative array
var passwd = new Object;]]></Script>
                <Enabled>true</Enabled>
            </Hook>
        </Hooks>
        <CheckpointConfig/>
        <SandboxConfig/>
        <SimulationConfig>
            <SimulationStates>
                <Component name="IF_passwd_data_not_loaded" state="Enabled"/>
                <Component name="ReadPasswdFile" state="Enabled"/>
                <Component name="StashPWEntry" state="Enabled"/>
                <Component name="FlagPasswdRead" state="Enabled"/>
                <Component name="IFUserInPasswdFile" state="Enabled"/>
                <Component name="ReportUserFound" state="Enabled"/>
                <Component name="ReportIfNamesDiffer" state="Enabled"/>
                <Component name="ELSEUserNotFound" state="Enabled"/>
                <Component name="ReportUserMissing" state="Enabled"/>
                <Component name="ReadLDIF" state="Enabled"/>
            </SimulationStates>
            <ProxySettings/>
        </SimulationConfig>
        <LogConfig/>
        <ContainerEF name="EntryFeedContainer">
            <Connector name="ReadLDIF">
                <InheritFrom>system:/Connectors/ibmdi.FileSystem</InheritFrom>
                <ConnectorMode>Iterator</ConnectorMode>
                <ConnectorState>Enabled</ConnectorState>
                <Configuration>
                    <UserComment/>
                    <InheritFrom>[parent]</InheritFrom>
                    <parameter name="debug">false</parameter>
                    <parameter name="filePath">/root/files/data-cleaning-exercise/names.ldif</parameter>
                    <parameter name="userComment"/>
                </Configuration>
                <Parser>
                    <UserComment/>
                    <InheritFrom>system:/Parsers/ibmdi.LDIF</InheritFrom>
                    <parameter name="debug">false</parameter>
                    <parameter name="userComment"/>
                    <Schema name="Input">
                        <InheritFrom>[parent]</InheritFrom>
                    </Schema>
                    <Schema name="Output">
                        <InheritFrom>[parent]</InheritFrom>
                    </Schema>
                </Parser>
                <AttributeMap name="Input">
                    <InheritFrom>[parent]</InheritFrom>
                    <AttributeMapItem>
                        <Name>$dn</Name>
                        <Type>simple</Type>
                        <Simple>$dn</Simple>
                    </AttributeMapItem>
                    <AttributeMapItem>
                        <Name>cn</Name>
                        <Type>simple</Type>
                        <Simple>cn</Simple>
                    </AttributeMapItem>
                    <AttributeMapItem>
                        <Name>displayName</Name>
                        <Type>simple</Type>
                        <Simple>displayName</Simple>
                    </AttributeMapItem>
                    <AttributeMapItem>
                        <Name>gecos</Name>
                        <Type>simple</Type>
                        <Simple>gecos</Simple>
                    </AttributeMapItem>
                    <AttributeMapItem>
                        <Name>gidNumber</Name>
                        <Type>simple</Type>
                        <Simple>gidNumber</Simple>
                    </AttributeMapItem>
                    <AttributeMapItem>
                        <Name>homeDirectory</Name>
                        <Type>simple</Type>
                        <Simple>homeDirectory</Simple>
                    </AttributeMapItem>
                    <AttributeMapItem>
                        <Name>mail</Name>
                        <Type>simple</Type>
                        <Simple>mail</Simple>
                    </AttributeMapItem>
                    <AttributeMapItem>
                        <Name>objectclass</Name>
                        <Type>simple</Type>
                        <Simple>objectclass</Simple>
                    </AttributeMapItem>
                    <AttributeMapItem>
                        <Name>sn</Name>
                        <Type>simple</Type>
                        <Simple>sn</Simple>
                    </AttributeMapItem>
                    <AttributeMapItem>
                        <Name>telephoneNumber</Name>
                        <Type>simple</Type>
                        <Simple>telephoneNumber</Simple>
                    </AttributeMapItem>
                    <AttributeMapItem>
                        <Name>uid</Name>
                        <Type>simple</Type>
                        <Simple>uid</Simple>
                    </AttributeMapItem>
                    <AttributeMapItem>
                        <Name>uidNumber</Name>
                        <Type>simple</Type>
                        <Simple>uidNumber</Simple>
                    </AttributeMapItem>
                    <AttributeMapItem>
                        <Name>userPassword</Name>
                        <Type>simple</Type>
                        <Simple>userPassword</Simple>
                    </AttributeMapItem>
                </AttributeMap>
                <AttributeMap name="Output">
                    <InheritFrom>[parent]</InheritFrom>
                </AttributeMap>
                <DeltaSettings>
                    <WhenToCommit>After every database operation</WhenToCommit>
                    <RowLocking>SERIALIZABLE</RowLocking>
                    <ChangeDetectionMode>DETECT_ALL</ChangeDetectionMode>
                </DeltaSettings>
                <Schema name="Input">
                    <InheritFrom>[parent]</InheritFrom>
                    <SchemaItem>
                        <Name>$dn</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>cn</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>displayName</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>gecos</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>gidNumber</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>homeDirectory</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>mail</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>objectclass</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>sn</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>telephoneNumber</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>uid</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>uidNumber</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>userPassword</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                </Schema>
                <Schema name="Output">
                    <InheritFrom>[parent]</InheritFrom>
                    <SchemaItem>
                        <Name>$dn</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>cn</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>displayName</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>gecos</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>gidNumber</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>homeDirectory</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>mail</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>objectclass</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>sn</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>telephoneNumber</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>uid</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>uidNumber</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                    <SchemaItem>
                        <Name>userPassword</Name>
                        <Syntax>java.lang.String</Syntax>
                    </SchemaItem>
                </Schema>
                <LinkCriteria>
                    <InheritFrom>[parent]</InheritFrom>
                </LinkCriteria>
                <Hooks>
                    <InheritFrom>[parent]</InheritFrom>
                </Hooks>
                <CheckpointConfig/>
                <SandboxConfig/>
                <Reconnect>
                    <InheritFrom>[parent]</InheritFrom>
                    <ReconnectRules/>
                </Reconnect>
                <Operations/>
                <PoolDefinition>
                    <InheritFrom>[parent]</InheritFrom>
                </PoolDefinition>
                <PoolInstance/>
                <InitializeOption>0</InitializeOption>
            </Connector>
        </ContainerEF>
        <ContainerDF name="DataFlowContainer">
            <Branch name="IF_passwd_data_not_loaded">
                <Loop name="ReadPasswdFile">
                    <LoopType>1</LoopType>
                    <Connector name="Connector Loop">
                        <InheritFrom>system:/Connectors/ibmdi.FileSystem</InheritFrom>
                        <ConnectorMode>Iterator</ConnectorMode>
                        <ConnectorState>Enabled</ConnectorState>
                        <Configuration>
                            <UserComment/>
                            <InheritFrom>[parent]</InheritFrom>
                            <parameter name="debug">false</parameter>
                            <parameter name="filePath">/root/files/data-cleaning-exercise/names.passwd</parameter>
                            <parameter name="userComment"/>
                        </Configuration>
                        <Parser>
                            <UserComment/>
                            <InheritFrom>system:/Parsers/ibmdi.CSV</InheritFrom>
                            <parameter name="csvColumnSeparator">:</parameter>
                            <parameter name="csvColumns"><![CDATA[pw_nam
pw_passwd
pw_uid
pw_gid
pw_gecos
pw_home
pw_shell]]></parameter>
                            <parameter name="debug">false</parameter>
                            <parameter name="userComment"/>
                            <Schema name="Input">
                                <InheritFrom>[parent]</InheritFrom>
                            </Schema>
                            <Schema name="Output">
                                <InheritFrom>[parent]</InheritFrom>
                            </Schema>
                        </Parser>
                        <AttributeMap name="Input">
                            <InheritFrom>[parent]</InheritFrom>
                            <AttributeMapItem>
                                <Name>pw_gecos</Name>
                                <Type>simple</Type>
                                <Simple>pw_gecos</Simple>
                            </AttributeMapItem>
                            <AttributeMapItem>
                                <Name>pw_gid</Name>
                                <Type>simple</Type>
                                <Simple>pw_gid</Simple>
                            </AttributeMapItem>
                            <AttributeMapItem>
                                <Name>pw_home</Name>
                                <Type>simple</Type>
                                <Simple>pw_home</Simple>
                            </AttributeMapItem>
                            <AttributeMapItem>
                                <Name>pw_nam</Name>
                                <Type>simple</Type>
                                <Simple>pw_nam</Simple>
                            </AttributeMapItem>
                            <AttributeMapItem>
                                <Name>pw_passwd</Name>
                                <Type>simple</Type>
                                <Simple>pw_passwd</Simple>
                            </AttributeMapItem>
                            <AttributeMapItem>
                                <Name>pw_shell</Name>
                                <Type>simple</Type>
                                <Simple>pw_shell</Simple>
                            </AttributeMapItem>
                            <AttributeMapItem>
                                <Name>pw_uid</Name>
                                <Type>simple</Type>
                                <Simple>pw_uid</Simple>
                            </AttributeMapItem>
                        </AttributeMap>
                        <AttributeMap name="Output"/>
                        <DeltaSettings>
                            <WhenToCommit>After every database operation</WhenToCommit>
                            <RowLocking>SERIALIZABLE</RowLocking>
                            <ChangeDetectionMode>DETECT_ALL</ChangeDetectionMode>
                        </DeltaSettings>
                        <Schema name="Input">
                            <InheritFrom>[parent]</InheritFrom>
                            <SchemaItem>
                                <Name>pw_gecos</Name>
                                <Syntax>java.lang.String</Syntax>
                                <NativeSyntax>java.lang.String</NativeSyntax>
                            </SchemaItem>
                            <SchemaItem>
                                <Name>pw_gid</Name>
                                <Syntax>java.lang.String</Syntax>
                                <NativeSyntax>java.lang.String</NativeSyntax>
                            </SchemaItem>
                            <SchemaItem>
                                <Name>pw_home</Name>
                                <Syntax>java.lang.String</Syntax>
                                <NativeSyntax>java.lang.String</NativeSyntax>
                            </SchemaItem>
                            <SchemaItem>
                                <Name>pw_nam</Name>
                                <Syntax>java.lang.String</Syntax>
                                <NativeSyntax>java.lang.String</NativeSyntax>
                            </SchemaItem>
                            <SchemaItem>
                                <Name>pw_passwd</Name>
                                <Syntax>java.lang.String</Syntax>
                                <NativeSyntax>java.lang.String</NativeSyntax>
                            </SchemaItem>
                            <SchemaItem>
                                <Name>pw_shell</Name>
                                <Syntax>java.lang.String</Syntax>
                                <NativeSyntax>java.lang.String</NativeSyntax>
                            </SchemaItem>
                            <SchemaItem>
                                <Name>pw_uid</Name>
                                <Syntax>java.lang.String</Syntax>
                                <NativeSyntax>java.lang.String</NativeSyntax>
                            </SchemaItem>
                        </Schema>
                        <Schema name="Output">
                            <UserComment>{extsyntax=TEXTAREA, name=userComment, sample=Your own comments go here}</UserComment>
                            <InheritFrom>[no inheritance]</InheritFrom>
                            <SchemaItem>
                                <Name>debug</Name>
                                <NativeSyntax>boolean</NativeSyntax>
                            </SchemaItem>
                            <SchemaItem>
                                <Name>exclusiveLock</Name>
                                <NativeSyntax>boolean</NativeSyntax>
                            </SchemaItem>
                            <SchemaItem>
                                <Name>fileAppend</Name>
                                <NativeSyntax>boolean</NativeSyntax>
                            </SchemaItem>
                            <SchemaItem>
                                <Name>fileAwaitDataTimeout</Name>
                                <NativeSyntax>DROPEDIT</NativeSyntax>
                            </SchemaItem>
                            <SchemaItem>
                                <Name>filePath</Name>
                            </SchemaItem>
                            <SchemaItem>
                                <Name>userComment</Name>
                                <NativeSyntax>TEXTAREA</NativeSyntax>
                            </SchemaItem>
                        </Schema>
                        <LinkCriteria/>
                        <Hooks>
                            <InheritFrom>[parent]</InheritFrom>
                        </Hooks>
                        <CheckpointConfig/>
                        <SandboxConfig/>
                        <Reconnect>
                            <InheritFrom>[parent]</InheritFrom>
                            <ReconnectRules/>
                        </Reconnect>
                        <Operations/>
                        <PoolDefinition>
                            <InheritFrom>[parent]</InheritFrom>
                        </PoolDefinition>
                        <PoolInstance/>
                        <InitializeOption>0</InitializeOption>
                    </Connector>
                    <Branch name="ReadPasswdFile">
                        <Script name="StashPWEntry">
                            <parameter name="script"><![CDATA[// Add the passwd entry to the passwd object

passwd[work.getString("pw_nam")] = [
	work.getString("pw_nam"),
	work.getString("pw_passwd"),
	work.getString("pw_uid"),
	work.getString("pw_gid"),
	work.getString("pw_gecos"),
	work.getString("pw_home"),
	work.getString("pw_shell"),
];]]></parameter>
                        </Script>
                        <Conditions/>
                        <MatchAny>false</MatchAny>
                        <Enabled>true</Enabled>
                        <Type>0</Type>
                    </Branch>
                </Loop>
                <Script name="FlagPasswdRead">
                    <parameter name="script"><![CDATA[// Mark that we have read the passwd file
passwd.__flag__ = "OK";]]></parameter>
                </Script>
                <ScriptCondition><![CDATA[// If we have an entry called __flag__ then the data is loaded
return (passwd.__flag__ != "OK")]]></ScriptCondition>
                <Conditions/>
                <MatchAny>false</MatchAny>
                <Enabled>true</Enabled>
                <Type>0</Type>
            </Branch>
            <Branch name="IFUserInPasswdFile">
                <Script name="ReportUserFound">
                    <parameter name="enabled">false</parameter>
                    <parameter name="script"><![CDATA[task.logmsg("User found: " + work.getString("uid"));
// Dump the work entry
task.dumpEntry(work);]]></parameter>
                </Script>
                <Script name="ReportIfNamesDiffer">
                    <parameter name="script"><![CDATA[// pw was defined in the IF earlier
var gecos = pw[4];
var cn = work.getString("cn") + "";

if (gecos != cn) {
	task.logmsg("Names differ for user " + work.getString("uid") +
	" LDIF: '" + cn + "' Passwd: '" + gecos + "'");
}
// Dump the work entry
// task.dumpEntry(work);]]></parameter>
                </Script>
                <ScriptCondition><![CDATA[// Fetch array from object
var pw = passwd[work.getString("uid")];
// task.logmsg("Lookup user " + work.getString("uid") + " returns " + pw[0]);
return (pw != undefined);]]></ScriptCondition>
                <Conditions/>
                <MatchAny>false</MatchAny>
                <Enabled>true</Enabled>
                <Type>0</Type>
            </Branch>
            <Branch name="ELSEUserNotFound">
                <Script name="ReportUserMissing">
                    <parameter name="script"><![CDATA[task.logmsg("User not found in passwd file: " + work.getString("uid"));
// Dump the work entry
// task.dumpEntry(work);]]></parameter>
                </Script>
                <Conditions/>
                <MatchAny>false</MatchAny>
                <Enabled>true</Enabled>
                <Type>2</Type>
            </Branch>
        </ContainerDF>
        <ThreadOptions/>
        <Operations/>
        <InitParams>
            <Schema name="AssemblyLineInitParams"/>
        </InitParams>
    </AssemblyLine>
</MetamergeConfig>