svn commit: r924378 [3/8] - in /ofbiz/trunk: ./ applications/accounting/config/ applications/accounting/webapp/accounting/WEB-INF/ applications/accounting/webapp/accounting/payment/report/ applications/accounting/widget/ applications/commonext/webapp/o...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r924378 [3/8] - in /ofbiz/trunk: ./ applications/accounting/config/ applications/accounting/webapp/accounting/WEB-INF/ applications/accounting/webapp/accounting/payment/report/ applications/accounting/widget/ applications/commonext/webapp/o...

lektran
Modified: ofbiz/trunk/applications/product/webapp/facility/inventory/report/InventoryReport.rptdesign
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/inventory/report/InventoryReport.rptdesign?rev=924378&r1=924377&r2=924378&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/inventory/report/InventoryReport.rptdesign (original)
+++ ofbiz/trunk/applications/product/webapp/facility/inventory/report/InventoryReport.rptdesign Wed Mar 17 17:28:01 2010
@@ -182,22 +182,22 @@ try {
 inputInvent =  FastMap.newInstance();
 inputInventFields =  FastMap.newInstance();
 if(params!=null){
- inputInventFields.put("facilityId", params["facilityId"]);
- inputInventFields.put("noConditionFind", "Y");
- //inputFields.put("productInternalName", params["internalName"]);
- /*
- inputFields.put("quantityOnHandTotal", params["offsetQOHQty"]);
- inputFields.put("availableToPromiseTotal", params["offsetATPQty"]);
- inputFields.put("productId", params["productId"]);
- inputFields.put("productTypeId", params["productTypeId"]);
- inputFields.put("searchInProductCategoryId", params["searchInProductCategoryId"]);
- inputFields.put("productSupplierId", params["productSupplierId"]);
- inputFields.put("productsSoldThruTimestamp", params["productsSoldThruTimestamp"]);
- inputFields.put("statusId", params["statusId"]);
- inputFields.put("VIEW_SIZE", params["VIEW_SIZE"]);
- inputFields.put("monthsInPastLimit", params["monthsInPastLimit"]);
- inputFields.put("fromDateSellThrough", params["fromDateSellThrough"]);
- inputFields.put("thruDateSellThrough", params["thruDateSellThrough"]);*/
+    inputInventFields.put("facilityId", params["facilityId"]);
+    inputInventFields.put("noConditionFind", "Y");
+    //inputFields.put("productInternalName", params["internalName"]);
+    /*
+    inputFields.put("quantityOnHandTotal", params["offsetQOHQty"]);
+    inputFields.put("availableToPromiseTotal", params["offsetATPQty"]);
+    inputFields.put("productId", params["productId"]);
+    inputFields.put("productTypeId", params["productTypeId"]);
+    inputFields.put("searchInProductCategoryId", params["searchInProductCategoryId"]);
+    inputFields.put("productSupplierId", params["productSupplierId"]);
+    inputFields.put("productsSoldThruTimestamp", params["productsSoldThruTimestamp"]);
+    inputFields.put("statusId", params["statusId"]);
+    inputFields.put("VIEW_SIZE", params["VIEW_SIZE"]);
+    inputFields.put("monthsInPastLimit", params["monthsInPastLimit"]);
+    inputFields.put("fromDateSellThrough", params["fromDateSellThrough"]);
+    inputFields.put("thruDateSellThrough", params["thruDateSellThrough"]);*/
 }
 inputInvent.put("userLogin",userLogin);
 inputInvent.put("inputFields",inputInventFields);
@@ -212,17 +212,17 @@ try {
 }]]></method>
             <method name="fetch"><![CDATA[if(inventories == null)return false;
 if(inventory = inventories.next()){
- row["productId"] = inventory.getString("productProductId");
- row["productName"] = inventory.getString("productInternalName");
- row["quantityOnHand"] = inventory.getString("quantityOnHandTotal");
- row["availableToPromise"] = inventory.getString("availableToPromiseTotal");
- row["retailPrice"] = inventory.getString("unitCost");
- row["datetimeReceived"] = inventory.getString("inventoryDateDateValue");
- Debug.logInfo("-----------inventory---------"+inventory.getString("productProductId"),module);
- return true;
+    row["productId"] = inventory.getString("productProductId");
+    row["productName"] = inventory.getString("productInternalName");
+    row["quantityOnHand"] = inventory.getString("quantityOnHandTotal");
+    row["availableToPromise"] = inventory.getString("availableToPromiseTotal");
+    row["retailPrice"] = inventory.getString("unitCost");
+    row["datetimeReceived"] = inventory.getString("inventoryDateDateValue");
+    Debug.logInfo("-----------inventory---------"+inventory.getString("productProductId"),module);
+    return true;
 }else{
- inventories.close();
- return false;
+    inventories.close();
+    return false;
 }]]></method>
         </script-data-set>
         <script-data-set name="Order" id="191">
@@ -283,8 +283,8 @@ try {
 }
 inputOrderFields =  FastMap.newInstance();
 if(params!=null){
- inputOrderFields.put("orderDateDateValue_fld0_op", params["orderDateDateValue_fld0_op"]);
- inputOrderFields.put("noConditionFind", "Y");
+    inputOrderFields.put("orderDateDateValue_fld0_op", params["orderDateDateValue_fld0_op"]);
+    inputOrderFields.put("noConditionFind", "Y");
 }
 
 orders = null;
@@ -302,13 +302,13 @@ try {
             <method name="fetch"><![CDATA[if(orders == null)return false;
 if(order = orders.next()){
     row["productOrderId"] = order.getString("productProductId");
- row["quantity"] = order.getString("quantity");
- row["orderDate"] = order.getString("orderDateDescription");
- Debug.logInfo("++++++++++++order++++++++"+order.getString("quantity"),module);
- return true;
+    row["quantity"] = order.getString("quantity");
+    row["orderDate"] = order.getString("orderDateDescription");
+    Debug.logInfo("++++++++++++order++++++++"+order.getString("quantity"),module);
+    return true;
 }else{
- orders.close();
- return false;
+    orders.close();
+    return false;
 }]]></method>
         </script-data-set>
     </data-sets>

Modified: ofbiz/trunk/framework/base/dtd/ofbiz-component.xsd
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/dtd/ofbiz-component.xsd?rev=924378&r1=924377&r2=924378&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/dtd/ofbiz-component.xsd (original)
+++ ofbiz/trunk/framework/base/dtd/ofbiz-component.xsd Wed Mar 17 17:28:01 2010
@@ -252,6 +252,6 @@ under the License.
         <service-resource type="group" loader="maincomponent" location="service/groups_test.xml"/>
         <service-resource type="eca" loader="maincomponent" location="service/secas_test.xml"/>
 
-     <webapp name="webtools" title="WebTools" server="default" location="webtools" mount-point="/webtools"/>
+        <webapp name="webtools" title="WebTools" server="default" location="webtools" mount-point="/webtools"/>
     </ofbiz-component>
 -->

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/json/JSON.jj
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/json/JSON.jj?rev=924378&r1=924377&r2=924378&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/json/JSON.jj (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/json/JSON.jj Wed Mar 17 17:28:01 2010
@@ -56,8 +56,8 @@ public class JSON {
 
     public JSON allowResolve(boolean allowResolve) {
         this.allowResolve = allowResolve;
- token_source.SwitchTo(allowResolve ? RESOLVE : DEFAULT);
- return this;
+    token_source.SwitchTo(allowResolve ? RESOLVE : DEFAULT);
+    return this;
     }
 }
 

Modified: ofbiz/trunk/framework/bi/script/org/ofbiz/bi/DimensionServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/bi/script/org/ofbiz/bi/DimensionServices.xml?rev=924378&r1=924377&r2=924378&view=diff
==============================================================================
--- ofbiz/trunk/framework/bi/script/org/ofbiz/bi/DimensionServices.xml (original)
+++ ofbiz/trunk/framework/bi/script/org/ofbiz/bi/DimensionServices.xml Wed Mar 17 17:28:01 2010
@@ -70,7 +70,7 @@ under the License.
         <entity-condition entity-name="InventoryItem" list="inventoryItems">
             <condition-expr field-name="inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM"/>
         </entity-condition>
- <iterate list="inventoryItems" entry="inventoryItem">
+        <iterate list="inventoryItems" entry="inventoryItem">
             <clear-field field="inventMap"/>
             <set field="inventMap.inventoryItemId" from-field="inventoryItem.inventoryItemId"/>
             <call-service service-name="loadInventoryFact" in-map-name="inventMap"></call-service>

Modified: ofbiz/trunk/framework/birt/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/birt/build.xml?rev=924378&r1=924377&r2=924378&view=diff
==============================================================================
--- ofbiz/trunk/framework/birt/build.xml (original)
+++ ofbiz/trunk/framework/birt/build.xml Wed Mar 17 17:28:01 2010
@@ -45,6 +45,6 @@ under the License.
         <fileset dir="../webapp/lib" includes="*.jar"/>
         <fileset dir="../webapp/build/lib" includes="*.jar"/>
         <fileset dir="../widget/build/lib" includes="*.jar"/>
-     <fileset dir="../common/build/lib" includes="*.jar"/>
+        <fileset dir="../common/build/lib" includes="*.jar"/>
     </path>
 </project>

Modified: ofbiz/trunk/framework/birt/data/helpdata/HELP_BIRT.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/birt/data/helpdata/HELP_BIRT.xml?rev=924378&r1=924377&r2=924378&view=diff
==============================================================================
--- ofbiz/trunk/framework/birt/data/helpdata/HELP_BIRT.xml (original)
+++ ofbiz/trunk/framework/birt/data/helpdata/HELP_BIRT.xml Wed Mar 17 17:28:01 2010
@@ -25,9 +25,9 @@ under the License.
     
     <title>OFBiz BIRT Overview</title>
     <para>
-     Welcome to OFBiz BIRT. The part installed within OFBiz allows you to run the reports which are prepared using Eclipse with the BIRT plugin installed.
-     As a demo we have prepared a product report as an example.
-     Look at the <link xl:href="http://eclipse.org/birt/phoenix/">Eclipse BIRT web site</link> for more information.
+        Welcome to OFBiz BIRT. The part installed within OFBiz allows you to run the reports which are prepared using Eclipse with the BIRT plugin installed.
+        As a demo we have prepared a product report as an example.
+        Look at the <link xl:href="http://eclipse.org/birt/phoenix/">Eclipse BIRT web site</link> for more information.
     </para>
     <para>
         This is a short document to help you get started using BIRT to make a report.
@@ -47,8 +47,8 @@ under the License.
     <section>
         <title>Examine the Example Report</title>
         <para>
-         The example report that run in OFBiz is in the file component://birt/webapp/birt/report/product.rptdesign. When you have started Eclipse BIRT, open this document.
-         This report show how a report receives data from OFBiz through Scripted Data Source using the OFBiz delegator.
+            The example report that run in OFBiz is in the file component://birt/webapp/birt/report/product.rptdesign. When you have started Eclipse BIRT, open this document.
+            This report show how a report receives data from OFBiz through Scripted Data Source using the OFBiz delegator.
             This report has the scripted data source name "OFBiz" and the data set that use the script data source name is called "Product".
             Open the script editor for Product data set, it uses the delegator object query data from the Product entity.
             A report that runs on the OFBiz platform can use the delegator object, dispatcher object, security object and classpath of OFBiz environment in the script.</para>
@@ -56,8 +56,8 @@ under the License.
     <section>
         <title>Important file for using BIRT's jsp tags</title>
         <para>
-         If a web applications wants to use the report in a screen, copy birt.tld file to [WEB APP]/WEB-INF/ directory ant assign in in ftl
-         like &lt;#assign birt = JspTaglibs["/WEB-INF/birt.tld"]/&gt;</para>
+            If a web applications wants to use the report in a screen, copy birt.tld file to [WEB APP]/WEB-INF/ directory ant assign in in ftl
+            like &lt;#assign birt = JspTaglibs["/WEB-INF/birt.tld"]/&gt;</para>
     </section>
     <section>
         <title>Important tag's attribute in ftl.</title>

Modified: ofbiz/trunk/framework/common/data/GeoData_CN.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/data/GeoData_CN.xml?rev=924378&r1=924377&r2=924378&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/data/GeoData_CN.xml (original)
+++ ofbiz/trunk/framework/common/data/GeoData_CN.xml Wed Mar 17 17:28:01 2010
@@ -24,14 +24,14 @@ under the License.
         See also: http://en.wikipedia.org/wiki/Province_of_China
                   http://en.wikipedia.org/wiki/ISO_3166-2:CN
     -->
- <Geo abbreviation="京" geoCode="11" geoId="CN-11" geoName="北京" geoTypeId="MUNICIPALITY"/>
- <Geo abbreviation="渝" geoCode="50" geoId="CN-50" geoName="重庆" geoTypeId="MUNICIPALITY"/>
- <Geo abbreviation="沪" geoCode="31" geoId="CN-31" geoName="上海" geoTypeId="MUNICIPALITY"/>
- <Geo abbreviation="津" geoCode="12" geoId="CN-12" geoName="天津" geoTypeId="MUNICIPALITY"/>
+    <Geo abbreviation="京" geoCode="11" geoId="CN-11" geoName="北京" geoTypeId="MUNICIPALITY"/>    
+    <Geo abbreviation="渝" geoCode="50" geoId="CN-50" geoName="重庆" geoTypeId="MUNICIPALITY"/>
+    <Geo abbreviation="沪" geoCode="31" geoId="CN-31" geoName="上海" geoTypeId="MUNICIPALITY"/>
+    <Geo abbreviation="æ´¥" geoCode="12" geoId="CN-12" geoName="天津" geoTypeId="MUNICIPALITY"/>
     <Geo abbreviation="黑" geoCode="23" geoId="CN-23" geoName="黑龙江" geoTypeId="PROVINCE"/>
     <Geo abbreviation="吉" geoCode="22" geoId="CN-22" geoName="吉林" geoTypeId="PROVINCE"/>
     <Geo abbreviation="è¾½" geoCode="21" geoId="CN-21" geoName="辽宁" geoTypeId="PROVINCE"/>
- <Geo abbreviation="青" geoCode="63" geoId="CN-63" geoName="青海" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="青" geoCode="63" geoId="CN-63" geoName="青海" geoTypeId="PROVINCE"/>
     <Geo abbreviation="甘" geoCode="62" geoId="CN-62" geoName="甘肃" geoTypeId="PROVINCE"/>
     <Geo abbreviation="陕" geoCode="61" geoId="CN-61" geoName="陕西" geoTypeId="PROVINCE"/>
     <Geo abbreviation="晋" geoCode="14" geoId="CN-14" geoName="山西" geoTypeId="PROVINCE"/>
@@ -45,21 +45,21 @@ under the License.
     <Geo abbreviation="滇" geoCode="53" geoId="CN-53" geoName="云南" geoTypeId="PROVINCE"/>
     <Geo abbreviation="黔" geoCode="52" geoId="CN-52" geoName="贵州" geoTypeId="PROVINCE"/>
     <Geo abbreviation="湘" geoCode="43" geoId="CN-43" geoName="湖南" geoTypeId="PROVINCE"/>
- <Geo abbreviation="赣" geoCode="36" geoId="CN-36" geoName="江西" geoTypeId="PROVINCE"/>
- <Geo abbreviation="浙" geoCode="33" geoId="CN-33" geoName="浙江" geoTypeId="PROVINCE"/>
- <Geo abbreviation="琼" geoCode="46" geoId="CN-46" geoName="海南" geoTypeId="PROVINCE"/>
- <Geo abbreviation="粤" geoCode="44" geoId="CN-44" geoName="广东" geoTypeId="PROVINCE"/>
- <Geo abbreviation="闽" geoCode="35" geoId="CN-35" geoName="福建" geoTypeId="PROVINCE"/>
- <Geo abbreviation="台" geoCode="71" geoId="CN-71" geoName="台湾" geoTypeId="PROVINCE"/>
- <Geo abbreviation="桂" geoCode="45" geoId="CN-45" geoName="广西" geoTypeId="REGION"/>
- <Geo abbreviation="内蒙古" geoCode="15" geoId="CN-15" geoName="内蒙古" geoTypeId="REGION"/>
- <Geo abbreviation="宁" geoCode="64" geoId="CN-64" geoName="宁夏" geoTypeId="REGION"/>
- <Geo abbreviation="新" geoCode="65" geoId="CN-65" geoName="新疆" geoTypeId="REGION"/>
- <Geo abbreviation="藏" geoCode="54" geoId="CN-54" geoName="西藏" geoTypeId="REGION"/>
+    <Geo abbreviation="èµ£" geoCode="36" geoId="CN-36" geoName="江西" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="浙" geoCode="33" geoId="CN-33" geoName="浙江" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="琼" geoCode="46" geoId="CN-46" geoName="海南" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="粤" geoCode="44" geoId="CN-44" geoName="广东" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="闽" geoCode="35" geoId="CN-35" geoName="福建" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="台" geoCode="71" geoId="CN-71" geoName="台湾" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="桂" geoCode="45" geoId="CN-45" geoName="广西" geoTypeId="REGION"/>
+    <Geo abbreviation="内蒙古" geoCode="15" geoId="CN-15" geoName="内蒙古" geoTypeId="REGION"/>    
+    <Geo abbreviation="宁" geoCode="64" geoId="CN-64" geoName="宁夏" geoTypeId="REGION"/>
+    <Geo abbreviation="新" geoCode="65" geoId="CN-65" geoName="新疆" geoTypeId="REGION"/>
+    <Geo abbreviation="藏" geoCode="54" geoId="CN-54" geoName="西藏" geoTypeId="REGION"/>
     <Geo abbreviation="香港" geoCode="91" geoId="CN-91" geoName="香港" geoTypeId="REGION"/>
- <Geo abbreviation="澳门" geoCode="92" geoId="CN-92" geoName="澳门" geoTypeId="REGION"/>
+    <Geo abbreviation="澳门" geoCode="92" geoId="CN-92" geoName="澳门" geoTypeId="REGION"/>
 
-    <GeoAssoc geoId="CHN" geoIdTo="CN-11" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-11" geoAssocTypeId="REGIONS"/>    
     <GeoAssoc geoId="CHN" geoIdTo="CN-50" geoAssocTypeId="REGIONS"/>
     <GeoAssoc geoId="CHN" geoIdTo="CN-31" geoAssocTypeId="REGIONS"/>
     <GeoAssoc geoId="CHN" geoIdTo="CN-12" geoAssocTypeId="REGIONS"/>
@@ -86,8 +86,8 @@ under the License.
     <GeoAssoc geoId="CHN" geoIdTo="CN-44" geoAssocTypeId="REGIONS"/>
     <GeoAssoc geoId="CHN" geoIdTo="CN-35" geoAssocTypeId="REGIONS"/>
     <GeoAssoc geoId="CHN" geoIdTo="CN-71" geoAssocTypeId="REGIONS"/>
- <GeoAssoc geoId="CHN" geoIdTo="CN-64" geoAssocTypeId="REGIONS"/>
- <GeoAssoc geoId="CHN" geoIdTo="CN-65" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-64" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-65" geoAssocTypeId="REGIONS"/>
     <GeoAssoc geoId="CHN" geoIdTo="CN-54" geoAssocTypeId="REGIONS"/>
     <GeoAssoc geoId="CHN" geoIdTo="CN-91" geoAssocTypeId="REGIONS"/>
     <GeoAssoc geoId="CHN" geoIdTo="CN-92" geoAssocTypeId="REGIONS"/>

Modified: ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl?rev=924378&r1=924377&r2=924378&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl Wed Mar 17 17:28:01 2010
@@ -27,11 +27,11 @@ under the License.
                 <#list context.displayFieldsSet as key>
                 <#assign field = autocompleteOption.get(key)?if_exists>
                 <#if field?has_content>
-                <#if (key == context.returnField)>
+                    <#if (key == context.returnField)>
                         <#assign returnField = field/>
-                <#else>
+                    <#else>
                         <#assign displayString = displayString + field + " ">
-                </#if>
+                    </#if>
                 </#if>
             </#list>
             <#if ("Y" == displayReturnField)>

Modified: ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java?rev=924378&r1=924377&r2=924378&view=diff
==============================================================================
--- ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java (original)
+++ ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java Wed Mar 17 17:28:01 2010
@@ -54,89 +54,89 @@ public class Record implements Serializa
 
     /** Creates new Record */
     protected Record(ModelRecord modelRecord) {
- if (modelRecord == null)
-    throw new IllegalArgumentException("Cannont create a Record with a null modelRecord parameter");
- this.recordName = modelRecord.name;
- this.modelRecord = modelRecord;
- this.fields = new HashMap<String, Object>();
+    if (modelRecord == null)
+        throw new IllegalArgumentException("Cannont create a Record with a null modelRecord parameter");
+    this.recordName = modelRecord.name;
+    this.modelRecord = modelRecord;
+    this.fields = new HashMap<String, Object>();
     }
 
     /** Creates new Record from existing Map */
     protected Record(ModelRecord modelRecord, Map<String, Object> fields) {
- if (modelRecord == null)
-    throw new IllegalArgumentException("Cannont create a Record with a null modelRecord parameter");
- this.recordName = modelRecord.name;
- this.modelRecord = modelRecord;
- this.fields = (fields == null ? new HashMap<String, Object>() : new HashMap<String, Object>(fields));
+    if (modelRecord == null)
+        throw new IllegalArgumentException("Cannont create a Record with a null modelRecord parameter");
+    this.recordName = modelRecord.name;
+    this.modelRecord = modelRecord;
+    this.fields = (fields == null ? new HashMap<String, Object>() : new HashMap<String, Object>(fields));
     }
 
     public String getRecordName() {
- return recordName;
+    return recordName;
     }
 
     public ModelRecord getModelRecord() {
- if (modelRecord == null) {
-    throw new IllegalStateException("[Record.getModelRecord] could not find modelRecord for recordName " + recordName);
- }
- return modelRecord;
+    if (modelRecord == null) {
+        throw new IllegalStateException("[Record.getModelRecord] could not find modelRecord for recordName " + recordName);
+    }
+    return modelRecord;
     }
 
     public Object get(String name) {
- if (getModelRecord().getModelField(name) == null) {
-    throw new IllegalArgumentException("[Record.get] \"" + name + "\" is not a field of " + recordName);
-    // Debug.logWarning("[GenericRecord.get] \"" + name + "\" is not a field of " + recordName + ", but getting anyway...", module);
- }
- return fields.get(name);
+    if (getModelRecord().getModelField(name) == null) {
+        throw new IllegalArgumentException("[Record.get] \"" + name + "\" is not a field of " + recordName);
+        // Debug.logWarning("[GenericRecord.get] \"" + name + "\" is not a field of " + recordName + ", but getting anyway...", module);
+    }
+    return fields.get(name);
     }
 
     public String getString(String name) {
- Object object = get(name);
+    Object object = get(name);
 
- if (object == null)
-    return null;
- if (object instanceof java.lang.String)
-    return (String) object;
- else
-    return object.toString();
+    if (object == null)
+        return null;
+    if (object instanceof java.lang.String)
+        return (String) object;
+    else
+        return object.toString();
     }
 
     public String getStringAndEmpty(String name) {
- Object object = get(name);
+    Object object = get(name);
 
- if (object == null)
-    return "";
- if (object instanceof java.lang.String)
-    return (String) object;
- else
-    return object.toString();
+    if (object == null)
+        return "";
+    if (object instanceof java.lang.String)
+        return (String) object;
+    else
+        return object.toString();
     }
 
     public java.sql.Timestamp getTimestamp(String name) {
- return (java.sql.Timestamp) get(name);
+    return (java.sql.Timestamp) get(name);
     }
 
     public java.sql.Time getTime(String name) {
- return (java.sql.Time) get(name);
+    return (java.sql.Time) get(name);
     }
 
     public java.sql.Date getDate(String name) {
- return (java.sql.Date) get(name);
+    return (java.sql.Date) get(name);
     }
 
     public Integer getInteger(String name) {
- return (Integer) get(name);
+    return (Integer) get(name);
     }
 
     public Long getLong(String name) {
- return (Long) get(name);
+    return (Long) get(name);
     }
 
     public Float getFloat(String name) {
- return (Float) get(name);
+    return (Float) get(name);
     }
 
     public Double getDouble(String name) {
- return (Double) get(name);
+    return (Double) get(name);
     }
 
     /** Sets the named field to the passed value, even if the value is null
@@ -144,7 +144,7 @@ public class Record implements Serializa
      * @param value The value to set
      */
     public void set(String name, Object value) {
- set(name, value, true);
+    set(name, value, true);
     }
 
     /** Sets the named field to the passed value. If value is null, it is only
@@ -154,25 +154,25 @@ public class Record implements Serializa
      * @param setIfNull Specifies whether or not to set the value if it is null
      */
     public synchronized void set(String name, Object value, boolean setIfNull) {
- if (getModelRecord().getModelField(name) == null) {
-    throw new IllegalArgumentException("[Record.set] \"" + name + "\" is not a field of " + recordName);
-    // Debug.logWarning("[GenericRecord.set] \"" + name + "\" is not a field of " + recordName + ", but setting anyway...", module);
- }
- if (value != null || setIfNull) {
-    if (value instanceof Boolean) {
- value = ((Boolean) value).booleanValue() ? "Y" : "N";
-    }
-    fields.put(name, value);
- }
+    if (getModelRecord().getModelField(name) == null) {
+        throw new IllegalArgumentException("[Record.set] \"" + name + "\" is not a field of " + recordName);
+        // Debug.logWarning("[GenericRecord.set] \"" + name + "\" is not a field of " + recordName + ", but setting anyway...", module);
+    }
+    if (value != null || setIfNull) {
+        if (value instanceof Boolean) {
+        value = ((Boolean) value).booleanValue() ? "Y" : "N";
+        }
+        fields.put(name, value);
+    }
     }
 
     /**
      * little endian reader for 2 byte short.
      */
     public final short readLEShort(byte[] byteArray) {
- return  (short)(
- (byteArray[1]&0xff) << 8 |
- (byteArray[0]&0xff));
+    return  (short)(
+        (byteArray[1]&0xff) << 8 |
+        (byteArray[0]&0xff));
 
     }
 
@@ -180,26 +180,26 @@ public class Record implements Serializa
      * little endian reader for 4 byte int.
      */
     public final int readLEInt(byte []byteArray) {
- return
- (byteArray[3])      << 24 |
- (byteArray[2]&0xff) << 16 |
- (byteArray[1]&0xff) <<  8 |
- (byteArray[0]&0xff);
+    return
+    (byteArray[3])      << 24 |
+    (byteArray[2]&0xff) << 16 |
+    (byteArray[1]&0xff) <<  8 |
+    (byteArray[0]&0xff);
     }
 
     /**
      * little endian reader for 8 byte long.
      */
     public final long readLELong(byte []byteArray) {
- return
- (long)(byteArray[7])      << 56 |  /* long cast needed or shift done modulo 32 */
- (long)(byteArray[6]&0xff) << 48 |
- (long)(byteArray[5]&0xff) << 40 |
- (long)(byteArray[4]&0xff) << 32 |
- (long)(byteArray[3]&0xff) << 24 |
- (long)(byteArray[2]&0xff) << 16 |
- (long)(byteArray[1]&0xff) <<  8 |
- (long)(byteArray[0]&0xff);
+    return
+    (long)(byteArray[7])      << 56 |  /* long cast needed or shift done modulo 32 */
+    (long)(byteArray[6]&0xff) << 48 |
+    (long)(byteArray[5]&0xff) << 40 |
+    (long)(byteArray[4]&0xff) << 32 |
+    (long)(byteArray[3]&0xff) << 24 |
+    (long)(byteArray[2]&0xff) << 16 |
+    (long)(byteArray[1]&0xff) <<  8 |
+    (long)(byteArray[0]&0xff);
     }
 
     /** Sets the named field to the passed value, converting the value from a String to the current type using <code>Type.valueOf()</code>
@@ -207,272 +207,272 @@ public class Record implements Serializa
      * @param value The String value to convert and set
      */
     public void setString(String name, String value) throws ParseException {
- if (name == null || value == null || value.equals(""))
-    return;
- ModelField field = getModelRecord().getModelField(name);
-
- if (field == null)
-    set(name, value); // this will get an error in the set() method...
-
- // if the string is all spaces ignore
- boolean nonSpace = false;
-
- for (int i = 0; i < value.length(); i++) {
-    if (value.charAt(i) != ' ') {
- nonSpace = true;
- break;
-    }
- }
- if (!nonSpace)
-    return;
-
- // if (Debug.verboseOn()) Debug.logVerbose("Value: " + value, module);
-
- String fieldType = field.type;
-
- // first the custom types that need to be parsed
- if (fieldType.equals("CustomTimestamp")) {
-    // this custom type will take a string a parse according to date formatting
-    // string then put the result in a java.sql.Timestamp
-    // a common timestamp format for flat files is with no separators: yyyyMMddHHmmss
-    SimpleDateFormat sdf = new SimpleDateFormat(field.format);
-    java.util.Date tempDate = sdf.parse(value);
-    java.sql.Timestamp timestamp = new java.sql.Timestamp(tempDate.getTime());
-
-    set(name, timestamp);
- } else if (fieldType.equals("CustomDate")) {
-    // a common date only format for flat files is with no separators: yyyyMMdd or MMddyyyy
-    SimpleDateFormat sdf = new SimpleDateFormat(field.format);
-    java.util.Date tempDate = sdf.parse(value);
-    java.sql.Date date = new java.sql.Date(tempDate.getTime());
-
-    set(name, date);
- } else if (fieldType.equals("CustomTime")) {
-    // a common time only format for flat files is with no separators: HHmmss
-    SimpleDateFormat sdf = new SimpleDateFormat(field.format);
-    java.util.Date tempDate = sdf.parse(value);
-    java.sql.Time time = new java.sql.Time(tempDate.getTime());
-
-    set(name, time);
- } else if (fieldType.equals("FixedPointDouble")) {
-    // this custom type will parse a fixed point number according to the number
-    // of decimal places in the formatting string then place it in a Double
-    NumberFormat nf = NumberFormat.getNumberInstance();
-    Number tempNum = nf.parse(value);
-    double number = tempNum.doubleValue();
-    double decimalPlaces = Double.parseDouble(field.format);
-    double divisor = Math.pow(10.0, decimalPlaces);
-
-    number = number / divisor;
-    set(name, Double.valueOf(number));
- } // standard types
- else if (fieldType.equals("java.lang.String") || fieldType.equals("String"))
-    if (field.format.equals("EncryptedString")) {
- String hashType = LoginServices.getHashType();
- set(name, HashCrypt.getDigestHash(value, hashType));
-    } else {
- set(name, value);
-    }
- else if (fieldType.equals("NullTerminatedString")) {
-    int terminate = value.indexOf(0x0);
-    set(name, terminate>0?value.substring(0,terminate):value);
- } else if (fieldType.equals("java.sql.Timestamp") || fieldType.equals("Timestamp"))
-    set(name, java.sql.Timestamp.valueOf(value));
- else if (fieldType.equals("java.sql.Time") || fieldType.equals("Time"))
-    set(name, java.sql.Time.valueOf(value));
- else if (fieldType.equals("java.sql.Date") || fieldType.equals("Date"))
-    set(name, java.sql.Date.valueOf(value));
- else if (fieldType.equals("java.lang.Integer") || fieldType.equals("Integer"))
-    set(name, Integer.valueOf(value));
- else if (fieldType.equals("java.lang.Long") || fieldType.equals("Long"))
-    set(name, Long.valueOf(value));
- else if (fieldType.equals("java.lang.Float") || fieldType.equals("Float"))
-    set(name, Float.valueOf(value));
- else if (fieldType.equals("java.lang.Double") || fieldType.equals("Double"))
-    set(name, Double.valueOf(value));
- else if (fieldType.equals("LEShort"))
-    set(name, Short.valueOf(readLEShort(value.getBytes())));
- else if (fieldType.equals("LEInteger"))
-    set(name, Integer.valueOf(readLEInt(value.getBytes())));
- else if (fieldType.equals("LELong"))
-    set(name, Long.valueOf(readLELong(value.getBytes())));
- else {
-    throw new IllegalArgumentException("Field type " + fieldType + " not currently supported. Sorry.");
- }
+    if (name == null || value == null || value.equals(""))
+        return;
+    ModelField field = getModelRecord().getModelField(name);
+
+    if (field == null)
+        set(name, value); // this will get an error in the set() method...
+
+    // if the string is all spaces ignore
+    boolean nonSpace = false;
+
+    for (int i = 0; i < value.length(); i++) {
+        if (value.charAt(i) != ' ') {
+        nonSpace = true;
+        break;
+        }
+    }
+    if (!nonSpace)
+        return;
+
+    // if (Debug.verboseOn()) Debug.logVerbose("Value: " + value, module);
+
+    String fieldType = field.type;
+
+    // first the custom types that need to be parsed
+    if (fieldType.equals("CustomTimestamp")) {
+        // this custom type will take a string a parse according to date formatting
+        // string then put the result in a java.sql.Timestamp
+        // a common timestamp format for flat files is with no separators: yyyyMMddHHmmss
+        SimpleDateFormat sdf = new SimpleDateFormat(field.format);
+        java.util.Date tempDate = sdf.parse(value);
+        java.sql.Timestamp timestamp = new java.sql.Timestamp(tempDate.getTime());
+
+        set(name, timestamp);
+    } else if (fieldType.equals("CustomDate")) {
+        // a common date only format for flat files is with no separators: yyyyMMdd or MMddyyyy
+        SimpleDateFormat sdf = new SimpleDateFormat(field.format);
+        java.util.Date tempDate = sdf.parse(value);
+        java.sql.Date date = new java.sql.Date(tempDate.getTime());
+
+        set(name, date);
+    } else if (fieldType.equals("CustomTime")) {
+        // a common time only format for flat files is with no separators: HHmmss
+        SimpleDateFormat sdf = new SimpleDateFormat(field.format);
+        java.util.Date tempDate = sdf.parse(value);
+        java.sql.Time time = new java.sql.Time(tempDate.getTime());
+
+        set(name, time);
+    } else if (fieldType.equals("FixedPointDouble")) {
+        // this custom type will parse a fixed point number according to the number
+        // of decimal places in the formatting string then place it in a Double
+        NumberFormat nf = NumberFormat.getNumberInstance();
+        Number tempNum = nf.parse(value);
+        double number = tempNum.doubleValue();
+        double decimalPlaces = Double.parseDouble(field.format);
+        double divisor = Math.pow(10.0, decimalPlaces);
+
+        number = number / divisor;
+        set(name, Double.valueOf(number));
+    } // standard types
+    else if (fieldType.equals("java.lang.String") || fieldType.equals("String"))
+        if (field.format.equals("EncryptedString")) {
+        String hashType = LoginServices.getHashType();
+        set(name, HashCrypt.getDigestHash(value, hashType));
+        } else {
+        set(name, value);
+        }
+    else if (fieldType.equals("NullTerminatedString")) {
+        int terminate = value.indexOf(0x0);
+        set(name, terminate>0?value.substring(0,terminate):value);
+    } else if (fieldType.equals("java.sql.Timestamp") || fieldType.equals("Timestamp"))
+        set(name, java.sql.Timestamp.valueOf(value));
+    else if (fieldType.equals("java.sql.Time") || fieldType.equals("Time"))
+        set(name, java.sql.Time.valueOf(value));
+    else if (fieldType.equals("java.sql.Date") || fieldType.equals("Date"))
+        set(name, java.sql.Date.valueOf(value));
+    else if (fieldType.equals("java.lang.Integer") || fieldType.equals("Integer"))
+        set(name, Integer.valueOf(value));
+    else if (fieldType.equals("java.lang.Long") || fieldType.equals("Long"))
+        set(name, Long.valueOf(value));
+    else if (fieldType.equals("java.lang.Float") || fieldType.equals("Float"))
+        set(name, Float.valueOf(value));
+    else if (fieldType.equals("java.lang.Double") || fieldType.equals("Double"))
+        set(name, Double.valueOf(value));
+    else if (fieldType.equals("LEShort"))
+        set(name, Short.valueOf(readLEShort(value.getBytes())));
+    else if (fieldType.equals("LEInteger"))
+        set(name, Integer.valueOf(readLEInt(value.getBytes())));
+    else if (fieldType.equals("LELong"))
+        set(name, Long.valueOf(readLELong(value.getBytes())));
+    else {
+        throw new IllegalArgumentException("Field type " + fieldType + " not currently supported. Sorry.");
+    }
     }
 
     public String getFixedString(String name) {
- if (name == null)
-    return null;
- if (getModelRecord() == null)
-    throw new IllegalArgumentException("Could not find modelrecord for field named \"" + name + "\"");
- ModelField field = getModelRecord().getModelField(name);
-
- if (field == null)
-    throw new IllegalArgumentException("Could not find model for field named \"" + name + "\"");
-
- Object value = get(name);
-
- if (value == null) {
-    return null;
- }
-
- String fieldType = field.type;
- String str = null;
-
- // first the custom types that need to be parsed
- if (fieldType.equals("CustomTimestamp")) {
-    // a common timestamp format for flat files is with no separators: yyyyMMddHHmmss
-    SimpleDateFormat sdf = new SimpleDateFormat(field.format);
-    java.sql.Timestamp timestamp = (java.sql.Timestamp) value;
-
-    str = sdf.format(new Date(timestamp.getTime()));
- } else if (fieldType.equals("CustomDate")) {
-    // a common date only format for flat files is with no separators: yyyyMMdd or MMddyyyy
-    SimpleDateFormat sdf = new SimpleDateFormat(field.format);
-    java.sql.Date date = (java.sql.Date) value;
-
-    str = sdf.format(new Date(date.getTime()));
- } else if (fieldType.equals("CustomTime")) {
-    // a common time only format for flat files is with no separators: HHmmss
-    SimpleDateFormat sdf = new SimpleDateFormat(field.format);
-    java.sql.Time time = (java.sql.Time) value;
-
-    str = sdf.format(new Date(time.getTime()));
- } else if (fieldType.equals("FixedPointDouble")) {
-    // this custom type will parse a fixed point number according to the number
-    // of decimal places in the formatting string then place it in a Double
-    double decimalPlaces = Double.parseDouble(field.format);
-    double multiplier = Math.pow(10.0, decimalPlaces);
-    double dnum = multiplier * ((Double) value).doubleValue();
-    long number = Math.round(dnum);
-
-    str = padFrontZeros(Long.toString(number), field.length);
-    // if (Debug.infoOn()) Debug.logInfo("[Record.getFixedString] FixedPointDouble: multiplier=" + multiplier + ", value=" + value + ", dnum=" + dnum + ", number=" + number + ", str=" + str, module);
- } // standard types
- else if (fieldType.equals("java.lang.String") || fieldType.equals("String"))
-    str = value.toString();
- else if (fieldType.equals("java.sql.Timestamp") || fieldType.equals("Timestamp"))
-    str = value.toString();
- else if (fieldType.equals("java.sql.Time") || fieldType.equals("Time"))
-    str = value.toString();
- else if (fieldType.equals("java.sql.Date") || fieldType.equals("Date"))
-    str = value.toString();
- // for all numbers, pad front with zeros if field length is specified
- else if (fieldType.equals("java.lang.Integer") || fieldType.equals("Integer"))
-    str = padFrontZeros(value.toString(), field.length);
- else if (fieldType.equals("java.lang.Long") || fieldType.equals("Long"))
-    str = padFrontZeros(value.toString(), field.length);
- else if (fieldType.equals("java.lang.Float") || fieldType.equals("Float"))
-    str = padFrontZeros(value.toString(), field.length);
- else if (fieldType.equals("java.lang.Double") || fieldType.equals("Double"))
-    str = padFrontZeros(value.toString(), field.length);
- else {
-    throw new IllegalArgumentException("Field type " + fieldType + " not currently supported. Sorry.");
- }
-
- if (str != null && field.length > 0 && str.length() < field.length) {
-    // pad the end with spaces
-    StringBuilder strBuf = new StringBuilder(str);
-
-    while (strBuf.length() < field.length)
- strBuf.append(' ');
-    str = strBuf.toString();
- }
- return str;
+    if (name == null)
+        return null;
+    if (getModelRecord() == null)
+        throw new IllegalArgumentException("Could not find modelrecord for field named \"" + name + "\"");
+    ModelField field = getModelRecord().getModelField(name);
+
+    if (field == null)
+        throw new IllegalArgumentException("Could not find model for field named \"" + name + "\"");
+
+    Object value = get(name);
+
+    if (value == null) {
+        return null;
+    }
+
+    String fieldType = field.type;
+    String str = null;
+
+    // first the custom types that need to be parsed
+    if (fieldType.equals("CustomTimestamp")) {
+        // a common timestamp format for flat files is with no separators: yyyyMMddHHmmss
+        SimpleDateFormat sdf = new SimpleDateFormat(field.format);
+        java.sql.Timestamp timestamp = (java.sql.Timestamp) value;
+
+        str = sdf.format(new Date(timestamp.getTime()));
+    } else if (fieldType.equals("CustomDate")) {
+        // a common date only format for flat files is with no separators: yyyyMMdd or MMddyyyy
+        SimpleDateFormat sdf = new SimpleDateFormat(field.format);
+        java.sql.Date date = (java.sql.Date) value;
+
+        str = sdf.format(new Date(date.getTime()));
+    } else if (fieldType.equals("CustomTime")) {
+        // a common time only format for flat files is with no separators: HHmmss
+        SimpleDateFormat sdf = new SimpleDateFormat(field.format);
+        java.sql.Time time = (java.sql.Time) value;
+
+        str = sdf.format(new Date(time.getTime()));
+    } else if (fieldType.equals("FixedPointDouble")) {
+        // this custom type will parse a fixed point number according to the number
+        // of decimal places in the formatting string then place it in a Double
+        double decimalPlaces = Double.parseDouble(field.format);
+        double multiplier = Math.pow(10.0, decimalPlaces);
+        double dnum = multiplier * ((Double) value).doubleValue();
+        long number = Math.round(dnum);
+
+        str = padFrontZeros(Long.toString(number), field.length);
+        // if (Debug.infoOn()) Debug.logInfo("[Record.getFixedString] FixedPointDouble: multiplier=" + multiplier + ", value=" + value + ", dnum=" + dnum + ", number=" + number + ", str=" + str, module);
+    } // standard types
+    else if (fieldType.equals("java.lang.String") || fieldType.equals("String"))
+        str = value.toString();
+    else if (fieldType.equals("java.sql.Timestamp") || fieldType.equals("Timestamp"))
+        str = value.toString();
+    else if (fieldType.equals("java.sql.Time") || fieldType.equals("Time"))
+        str = value.toString();
+    else if (fieldType.equals("java.sql.Date") || fieldType.equals("Date"))
+        str = value.toString();
+    // for all numbers, pad front with zeros if field length is specified
+    else if (fieldType.equals("java.lang.Integer") || fieldType.equals("Integer"))
+        str = padFrontZeros(value.toString(), field.length);
+    else if (fieldType.equals("java.lang.Long") || fieldType.equals("Long"))
+        str = padFrontZeros(value.toString(), field.length);
+    else if (fieldType.equals("java.lang.Float") || fieldType.equals("Float"))
+        str = padFrontZeros(value.toString(), field.length);
+    else if (fieldType.equals("java.lang.Double") || fieldType.equals("Double"))
+        str = padFrontZeros(value.toString(), field.length);
+    else {
+        throw new IllegalArgumentException("Field type " + fieldType + " not currently supported. Sorry.");
+    }
+
+    if (str != null && field.length > 0 && str.length() < field.length) {
+        // pad the end with spaces
+        StringBuilder strBuf = new StringBuilder(str);
+
+        while (strBuf.length() < field.length)
+        strBuf.append(' ');
+        str = strBuf.toString();
+    }
+    return str;
     }
 
     public String writeLineString(ModelDataFile modelDataFile) throws DataFileException {
- ModelRecord modelRecord = getModelRecord();
- boolean isFixedRecord = ModelDataFile.SEP_FIXED_RECORD.equals(modelDataFile.separatorStyle);
- boolean isFixedLength = ModelDataFile.SEP_FIXED_LENGTH.equals(modelDataFile.separatorStyle);
- boolean isDelimited = ModelDataFile.SEP_DELIMITED.equals(modelDataFile.separatorStyle);
-
- StringBuilder lineBuf = new StringBuilder();
-
- for (ModelField modelField: modelRecord.fields) {
-    String data = this.getFixedString(modelField.name);
-
-    if (isDelimited && null != modelDataFile.textDelimiter) {
- lineBuf.append(modelDataFile.textDelimiter);
-    }
-
-    // if field is null (not set) then assume we want to pad the field
-    char PAD_CHAR = ' ';
-
-    if (data == null) {
- StringBuilder sb = new StringBuilder("");
-
- for (int i = 0; i < modelField.length; i++)
-    sb.append(PAD_CHAR);
- data = sb.toString();
-    }
-
-    // Pad the record
-    if (isFixedRecord) {
- while (modelField.position > lineBuf.length())
-    lineBuf.append(" ");
-    }
-    // if (Debug.infoOn()) Debug.logInfo("Field: " + modelField.name + " Position: " + modelField.position + " BufLen: " + lineBuf.length(), module);
-
-    // if (Debug.infoOn()) Debug.logInfo("Got data \"" + data + "\" for field " + modelField.name + " in record " + modelRecord.name, module);
-    if (modelField.length > 0 && data.length() != modelField.length)
- throw new DataFileException("Got field length " + data.length() + " but expected field length is " + modelField.length + " for field \"" +
- modelField.name + "\" of record \"" + modelRecord.name + "\" data is: \"" + data + "\"");
-
-    lineBuf.append(data);
-    if (isDelimited) {
- if (null != modelDataFile.textDelimiter) {
-    lineBuf.append(modelDataFile.textDelimiter);
- }
- lineBuf.append(modelDataFile.delimiter);
-    }
- }
-
- if (isDelimited) {
-    // just remove the last delimiter to finish clean, otherwise shows as extra column
-    lineBuf.setLength(lineBuf.length() - 1);
- }
-
- if ((isFixedRecord || isFixedLength) && modelDataFile.recordLength > 0 && lineBuf.length() != modelDataFile.recordLength)
-    throw new DataFileException("Got record length " + lineBuf.length() + " but expected record length is " + modelDataFile.recordLength +
-    " for record \"" + modelRecord.name + "\" data line is: \"" + lineBuf + "\"");
-
- // for convenience, insert the type-code in where it is looked for, if exists
- if (modelRecord.tcPosition > 0 && modelRecord.typeCode.length() > 0) {
-    lineBuf.replace(modelRecord.tcPosition, modelRecord.tcPosition + modelRecord.tcLength, modelRecord.typeCode);
- }
+    ModelRecord modelRecord = getModelRecord();
+    boolean isFixedRecord = ModelDataFile.SEP_FIXED_RECORD.equals(modelDataFile.separatorStyle);
+    boolean isFixedLength = ModelDataFile.SEP_FIXED_LENGTH.equals(modelDataFile.separatorStyle);
+    boolean isDelimited = ModelDataFile.SEP_DELIMITED.equals(modelDataFile.separatorStyle);
+
+    StringBuilder lineBuf = new StringBuilder();
+
+    for (ModelField modelField: modelRecord.fields) {
+        String data = this.getFixedString(modelField.name);
+
+        if (isDelimited && null != modelDataFile.textDelimiter) {
+        lineBuf.append(modelDataFile.textDelimiter);
+        }
+
+        // if field is null (not set) then assume we want to pad the field
+        char PAD_CHAR = ' ';
+
+        if (data == null) {
+        StringBuilder sb = new StringBuilder("");
+
+        for (int i = 0; i < modelField.length; i++)
+            sb.append(PAD_CHAR);
+        data = sb.toString();
+        }
 
- if (isFixedLength || isDelimited)
-    lineBuf.append('\n');
+        // Pad the record
+        if (isFixedRecord) {
+        while (modelField.position > lineBuf.length())
+            lineBuf.append(" ");
+        }
+        // if (Debug.infoOn()) Debug.logInfo("Field: " + modelField.name + " Position: " + modelField.position + " BufLen: " + lineBuf.length(), module);
 
- return lineBuf.toString();
+        // if (Debug.infoOn()) Debug.logInfo("Got data \"" + data + "\" for field " + modelField.name + " in record " + modelRecord.name, module);
+        if (modelField.length > 0 && data.length() != modelField.length)
+        throw new DataFileException("Got field length " + data.length() + " but expected field length is " + modelField.length + " for field \"" +
+            modelField.name + "\" of record \"" + modelRecord.name + "\" data is: \"" + data + "\"");
+
+        lineBuf.append(data);
+        if (isDelimited) {
+        if (null != modelDataFile.textDelimiter) {
+            lineBuf.append(modelDataFile.textDelimiter);
+        }
+        lineBuf.append(modelDataFile.delimiter);
+        }
+    }
+
+    if (isDelimited) {
+        // just remove the last delimiter to finish clean, otherwise shows as extra column
+        lineBuf.setLength(lineBuf.length() - 1);
+    }
+
+    if ((isFixedRecord || isFixedLength) && modelDataFile.recordLength > 0 && lineBuf.length() != modelDataFile.recordLength)
+        throw new DataFileException("Got record length " + lineBuf.length() + " but expected record length is " + modelDataFile.recordLength +
+            " for record \"" + modelRecord.name + "\" data line is: \"" + lineBuf + "\"");
+
+    // for convenience, insert the type-code in where it is looked for, if exists
+    if (modelRecord.tcPosition > 0 && modelRecord.typeCode.length() > 0) {
+        lineBuf.replace(modelRecord.tcPosition, modelRecord.tcPosition + modelRecord.tcLength, modelRecord.typeCode);
+    }
+
+    if (isFixedLength || isDelimited)
+        lineBuf.append('\n');
+
+    return lineBuf.toString();
     }
 
     String padFrontZeros(String str, int totalLength) {
- if (totalLength > 0 && str.length() < totalLength) {
-    // pad the front with zeros
-    StringBuilder zeros = new StringBuilder();
-    int numZeros = totalLength - str.length();
-
-    for (int i = 0; i < numZeros; i++)
- zeros.append('0');
-    zeros.append(str);
-    return zeros.toString();
- } else
-    return str;
+    if (totalLength > 0 && str.length() < totalLength) {
+        // pad the front with zeros
+        StringBuilder zeros = new StringBuilder();
+        int numZeros = totalLength - str.length();
+
+        for (int i = 0; i < numZeros; i++)
+        zeros.append('0');
+        zeros.append(str);
+        return zeros.toString();
+    } else
+        return str;
     }
 
     public Record getParentRecord() {
- return parentRecord;
+    return parentRecord;
     }
 
     public List<Record> getChildRecords() {
- return childRecords;
+    return childRecords;
     }
 
     public void addChildRecord(Record record) {
- childRecords.add(record);
+    childRecords.add(record);
     }
 
     /** Creates new Record
@@ -481,9 +481,9 @@ public class Record implements Serializa
      * @return
      */
     public static Record createRecord(ModelRecord modelRecord) throws DataFileException {
- Record record = new Record(modelRecord);
+    Record record = new Record(modelRecord);
 
- return record;
+    return record;
     }
 
     /** Creates new Record from existing fields Map
@@ -493,9 +493,9 @@ public class Record implements Serializa
      * @return
      */
     public static Record createRecord(ModelRecord modelRecord, Map<String, Object> fields) throws DataFileException {
- Record record = new Record(modelRecord, fields);
+    Record record = new Record(modelRecord, fields);
 
- return record;
+    return record;
     }
 
     /**
@@ -506,30 +506,30 @@ public class Record implements Serializa
      * @return
      */
     public static Record createRecord(String line, int lineNum, ModelRecord modelRecord) throws DataFileException {
- Record record = new Record(modelRecord);
+    Record record = new Record(modelRecord);
 
- for (ModelField modelField: modelRecord.fields) {
-    String strVal = null;
+    for (ModelField modelField: modelRecord.fields) {
+        String strVal = null;
 
 
-    try {
- strVal = line.substring(modelField.position, modelField.position + modelField.length);
-    } catch (IndexOutOfBoundsException ioobe) {
- throw new DataFileException("Field " + modelField.name + " from " + modelField.position +
- " for " + modelField.length + " chars could not be read from a line (" + lineNum + ") with only " +
- line.length() + " chars.", ioobe);
-    }
-    try {
- record.setString(modelField.name, strVal);
-    } catch (java.text.ParseException e) {
- throw new DataFileException("Could not parse field " + modelField.name + ", format string \"" + modelField.format + "\" with value " + strVal +
- " on line " + lineNum, e);
-    } catch (java.lang.NumberFormatException e) {
- throw new DataFileException("Number not valid for field " + modelField.name + ", format string \"" + modelField.format + "\" with value " +
- strVal + " on line " + lineNum, e);
-    }
- }
- return record;
+        try {
+        strVal = line.substring(modelField.position, modelField.position + modelField.length);
+        } catch (IndexOutOfBoundsException ioobe) {
+        throw new DataFileException("Field " + modelField.name + " from " + modelField.position +
+            " for " + modelField.length + " chars could not be read from a line (" + lineNum + ") with only " +
+            line.length() + " chars.", ioobe);
+        }
+        try {
+        record.setString(modelField.name, strVal);
+        } catch (java.text.ParseException e) {
+        throw new DataFileException("Could not parse field " + modelField.name + ", format string \"" + modelField.format + "\" with value " + strVal +
+            " on line " + lineNum, e);
+        } catch (java.lang.NumberFormatException e) {
+        throw new DataFileException("Number not valid for field " + modelField.name + ", format string \"" + modelField.format + "\" with value " +
+            strVal + " on line " + lineNum, e);
+        }
+    }
+    return record;
     }
 
     /**
@@ -541,58 +541,58 @@ public class Record implements Serializa
      * @return
      */
     public static Record createDelimitedRecord(String line, int lineNum, ModelRecord modelRecord, char delimiter, String textDelimiter) throws DataFileException {
- Record record = new Record(modelRecord);
+    Record record = new Record(modelRecord);
 
- StringTokenizer st = null;
- if (line.endsWith(String.valueOf(delimiter))) {
-    st = new StringTokenizer(line + " ", "" + delimiter, true);
- }
- else {
-    st = new StringTokenizer(line, "" + delimiter, true);
- }
- for (ModelField modelField: modelRecord.fields) {
-    String strVal = null;
-
-    if (modelField.expression) {
- if (UtilValidate.isNotEmpty(modelField.refField)) {
-    strVal = record.getString(modelField.refField);
- }
- if (strVal == null) {
-    strVal = (String)modelField.defaultValue;
- }
-    } else {
- //some input lines may be less than the header model.
- if (st.hasMoreTokens()) {
-    try {
- strVal = st.nextToken();
- if (strVal.equals("" + delimiter)) {
-    strVal = null;
- } else if (st.hasMoreTokens()) {
-    st.nextToken();
- }
-    } catch (NoSuchElementException nsee) {
- throw new DataFileException("Field " + modelField.name + " could not be read from a line (" + lineNum + ") with only " +
- line.length() + " chars.", nsee);
-    }                
- }
- else { //if input line is less than the header model then pad with null
-    strVal = null;
- }
-    }
-    try {
- if (textDelimiter != null && (strVal.startsWith(textDelimiter) && strVal.endsWith(textDelimiter))) {
-    strVal = strVal.substring(textDelimiter.length(), strVal.length() - textDelimiter.length());
- }
- record.setString(modelField.name, strVal);
-    } catch (java.text.ParseException e) {
- throw new DataFileException("Could not parse field " + modelField.name + ", format string \"" + modelField.format + "\" with value " + strVal +
- " on line " + lineNum, e);
-    } catch (java.lang.NumberFormatException e) {
- throw new DataFileException("Number not valid for field " + modelField.name + ", format string \"" + modelField.format + "\" with value " +
- strVal + " on line " + lineNum, e);
-    }
- }
- return record;
+    StringTokenizer st = null;
+    if (line.endsWith(String.valueOf(delimiter))) {
+        st = new StringTokenizer(line + " ", "" + delimiter, true);
+    }
+    else {
+        st = new StringTokenizer(line, "" + delimiter, true);
+    }
+    for (ModelField modelField: modelRecord.fields) {
+        String strVal = null;
+
+        if (modelField.expression) {
+        if (UtilValidate.isNotEmpty(modelField.refField)) {
+            strVal = record.getString(modelField.refField);
+        }
+        if (strVal == null) {
+            strVal = (String)modelField.defaultValue;
+        }
+        } else {
+        //some input lines may be less than the header model.
+        if (st.hasMoreTokens()) {
+            try {
+            strVal = st.nextToken();
+            if (strVal.equals("" + delimiter)) {
+                strVal = null;
+            } else if (st.hasMoreTokens()) {
+                st.nextToken();
+            }
+            } catch (NoSuchElementException nsee) {
+            throw new DataFileException("Field " + modelField.name + " could not be read from a line (" + lineNum + ") with only " +
+                line.length() + " chars.", nsee);
+            }                
+        }
+        else { //if input line is less than the header model then pad with null
+            strVal = null;
+        }
+        }
+        try {
+        if (textDelimiter != null && (strVal.startsWith(textDelimiter) && strVal.endsWith(textDelimiter))) {
+            strVal = strVal.substring(textDelimiter.length(), strVal.length() - textDelimiter.length());
+        }
+        record.setString(modelField.name, strVal);
+        } catch (java.text.ParseException e) {
+        throw new DataFileException("Could not parse field " + modelField.name + ", format string \"" + modelField.format + "\" with value " + strVal +
+            " on line " + lineNum, e);
+        } catch (java.lang.NumberFormatException e) {
+        throw new DataFileException("Number not valid for field " + modelField.name + ", format string \"" + modelField.format + "\" with value " +
+            strVal + " on line " + lineNum, e);
+        }
+    }
+    return record;
     }
 
 }

Modified: ofbiz/trunk/framework/documents/Framework.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/documents/Framework.xml?rev=924378&r1=924377&r2=924378&view=diff
==============================================================================
--- ofbiz/trunk/framework/documents/Framework.xml (original)
+++ ofbiz/trunk/framework/documents/Framework.xml Wed Mar 17 17:28:01 2010
@@ -18,11 +18,11 @@
     under the License.
 -->
 <chapter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- version="5.0" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"
- xsi:schemaLocation="http://docbook.org/ns/docbook ../../applications/content/dtd/docbook.xsd"
- xmlns="http://docbook.org/ns/docbook">
- <title>The OFBiz Framework Introduction.</title>
+    version="5.0" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"
+    xsi:schemaLocation="http://docbook.org/ns/docbook ../../applications/content/dtd/docbook.xsd"
+    xmlns="http://docbook.org/ns/docbook">
+    <title>The OFBiz Framework Introduction.</title>
     <para>
-   For a core configuration guide check <link xl:href="http://ofbiz.apache.org/docs/coreconfig.html">the OFBiz website.</link>
+       For a core configuration guide check <link xl:href="http://ofbiz.apache.org/docs/coreconfig.html">the OFBiz website.</link>
     </para>
 </chapter>

Modified: ofbiz/trunk/framework/entity/documents/EntityEngine.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/documents/EntityEngine.xml?rev=924378&r1=924377&r2=924378&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/documents/EntityEngine.xml (original)
+++ ofbiz/trunk/framework/entity/documents/EntityEngine.xml Wed Mar 17 17:28:01 2010
@@ -18,10 +18,10 @@
     under the License.
 -->
 <section xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- version="5.0" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"
- xsi:schemaLocation="http://docbook.org/ns/docbook ../../../applications/content/dtd/docbook.xsd"
- xmlns="http://docbook.org/ns/docbook">
- <title>The Entity Engine.</title>
+    version="5.0" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"
+    xsi:schemaLocation="http://docbook.org/ns/docbook ../../../applications/content/dtd/docbook.xsd"
+    xmlns="http://docbook.org/ns/docbook">
+    <title>The Entity Engine.</title>
 
     <section>
     <title>Entity Engine guide.</title>
@@ -44,5 +44,5 @@
     </para>
         
     </section>
-
+    
 </section>