notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2169 - in development/planet/users/niclas/iso8583: . elements/src/main/net/dpml/iso8583/data/elements
- From: niclas AT hedhman.org
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2169 - in development/planet/users/niclas/iso8583: . elements/src/main/net/dpml/iso8583/data/elements
- Date: Mon, 28 Mar 2005 15:04:23 -0500
Author: niclas AT hedhman.org
Date: Mon Mar 28 15:04:23 2005
New Revision: 2169
Added:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/GenericDataElement.java
(contents, props changed)
Removed:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AnonymousDataElement.java
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java
development/planet/users/niclas/iso8583/iso8583.iws
Log:
Better name for GenericDataElement.
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java
Mon Mar 28 15:04:23 2005
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package net.dpml.iso8583.data.elements;
import net.dpml.iso8583.data.DataElement;
@@ -6,23 +24,33 @@
import org.jpos.iso.ISOMsg;
import org.jpos.iso.ISOException;
-/**
- * Created by IntelliJ IDEA. User: niclas Date: Mar 28, 2005 Time: 3:27:33
PM To change this template use File |
- * Settings | File Templates.
- */
public abstract class AbstractDataElement
implements DataElement
{
-
+ /** The provided Logger instance. */
protected Logger m_logger;
+ /** The value of the field. */
private String m_value;
+ /** Constructor
+ *
+ * @param logger the Logger instance to be used.
+ */
protected AbstractDataElement( Logger logger )
{
m_logger = logger;
}
+ /** Returns the name of the Data Element.
+ *
+ * Normalized data element names are the verbatim copy of the data
element names from the ISO8583:1-2003
+ * specification, with the spaces removed and each word starting with a
uppercase character.
+ * For instance bit/field 10 with the name <strong>Conversion rate
cardholder billing</strong> becomes
+ * <strong>ConversionRateCardholderBilling</strong>.
+ *
+ * @return the normalized name of the data element.
+ */
public String getName()
{
String str = getClass().getName();
@@ -105,7 +133,15 @@
m_value = value;
}
+ /** Return the Representation object.
+ *
+ * @return the Representation of this data element.
+ */
public abstract Representation getRepresentation();
+ /** Return the ISO8583 bit/field number of the data element.
+ *
+ * @return the bit/field number of this data element.
+ */
public abstract int getIsoBitNumber();
}
Added:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/GenericDataElement.java
==============================================================================
--- (empty file)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/GenericDataElement.java
Mon Mar 28 15:04:23 2005
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.elements;
+
+import net.dpml.iso8583.data.Representation;
+import net.dpml.logging.Logger;
+
+public class GenericDataElement extends AbstractDataElement
+{
+ private Representation m_rep;
+ private String m_name;
+ private String m_value;
+ private int m_field;
+
+ public GenericDataElement( Logger logger, Representation rep, String
name, int fieldno )
+ {
+ super( logger );
+ m_name = name;
+ m_rep = rep;
+ m_field = fieldno;
+ }
+
+ public String getName()
+ {
+ return m_name;
+ }
+
+ public Representation getRepresentation()
+ {
+ return m_rep;
+ }
+
+ public int getIsoBitNumber()
+ {
+ return m_field;
+ }
+}
Modified: development/planet/users/niclas/iso8583/iso8583.iws
==============================================================================
--- development/planet/users/niclas/iso8583/iso8583.iws (original)
+++ development/planet/users/niclas/iso8583/iso8583.iws Mon Mar 28 15:04:23
2005
@@ -146,19 +146,10 @@
<option name="HIDE_WARNINGS" value="false" />
</component>
<component name="FileEditorManager" split-orientation="vertical"
split-proportion="0.5">
- <first-group
selected-file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java">
+ <first-group
selected-file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/GenericDataElement.java">
<entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/PosCapability.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="60" column="0" selection-start="1914"
selection-end="1914" vertical-scroll-proportion="0.80551904">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/PosDataCode.java"
pinned="false">
- <provider selected="true" editor-type-id="text-editor">
- <state line="60" column="0" selection-start="1900"
selection-end="1900" vertical-scroll-proportion="0.80551904">
+ <state line="0" column="0" selection-start="0" selection-end="620"
vertical-scroll-proportion="0.0">
<folding>
<element signature="imports" expanded="true" />
</folding>
@@ -211,7 +202,16 @@
</entry>
<entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="12" column="22" selection-start="396"
selection-end="396" vertical-scroll-proportion="-1.064389">
+ <state line="147" column="7" selection-start="5136"
selection-end="5136" vertical-scroll-proportion="0.9605782">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/GenericDataElement.java"
pinned="false">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="23" column="27" selection-start="768"
selection-end="768" vertical-scroll-proportion="0.13797635">
<folding>
<element signature="imports" expanded="true" />
</folding>
@@ -465,13 +465,6 @@
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="editorHistoryManager">
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/DateReconciliation.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="60" column="0" selection-start="1933"
selection-end="1933" vertical-scroll-proportion="0.80551904">
- <folding />
- </state>
- </provider>
- </entry>
<entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/DateSettlement.java">
<provider selected="true" editor-type-id="text-editor">
<state line="60" column="0" selection-start="1914"
selection-end="1914" vertical-scroll-proportion="0.80551904">
@@ -500,15 +493,6 @@
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/PosCapability.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="60" column="0" selection-start="1914"
selection-end="1914" vertical-scroll-proportion="0.80551904">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
<entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/PosDataCode.java">
<provider selected="true" editor-type-id="text-editor">
<state line="60" column="0" selection-start="1900"
selection-end="1900" vertical-scroll-proportion="0.80551904">
@@ -560,18 +544,36 @@
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/XX.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="12" column="22" selection-start="396"
selection-end="396" vertical-scroll-proportion="-1.064389">
+ <state line="50" column="55" selection-start="1684"
selection-end="1684" vertical-scroll-proportion="0.67017084">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/XX.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/PosCapability.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="50" column="55" selection-start="1684"
selection-end="1684" vertical-scroll-proportion="0.67017084">
+ <state line="0" column="0" selection-start="0" selection-end="620"
vertical-scroll-proportion="0.0">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/GenericDataElement.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="23" column="27" selection-start="768"
selection-end="768" vertical-scroll-proportion="0.13797635">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="147" column="7" selection-start="5136"
selection-end="5136" vertical-scroll-proportion="0.9605782">
<folding>
<element signature="imports" expanded="true" />
</folding>
- svn commit: r2169 - in development/planet/users/niclas/iso8583: . elements/src/main/net/dpml/iso8583/data/elements, niclas, 03/28/2005
Archive powered by MHonArc 2.6.24.