|
From: <and...@us...> - 2017-06-28 18:57:21
|
Revision: 1461
http://sourceforge.net/p/ggc/code/1461
Author: andyrozman
Date: 2017-06-28 18:57:17 +0000 (Wed, 28 Jun 2017)
Log Message:
-----------
2.0.3 [26.6.2017]
- changed enums, so that translation are changed from withing DataAccess
- refactorings
- changes to Db Objects
Modified Paths:
--------------
trunk/ggc-plugins/ggc-pump/docs/Changelog
trunk/ggc-plugins/ggc-pump/pom.xml
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpDataReader.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpValuesEntry.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpValuesEntryExt.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpValuesEntryProfile.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpAdditionalDataType.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpAlarms.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpBasalType.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpBaseType.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpBolusType.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpConfigurationGroup.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpErrors.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpEventType.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpReport.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/RatioType.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/graph/GraphViewBasalRateEstimator.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/graph/GraphViewDailyPump.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/graph/bre/GraphViewBasalRate.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/graph/bre/GraphViewBasals.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/graph/bre/GraphViewRatios.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/graph/v1/GraphV1DbRetrieverPump.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/profile/Profile.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/db/GGCPumpDb.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/db/PumpData.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/db/PumpDataExtended.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/db/PumpProfile.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/defs/PumpPluginDefinition.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/defs/device/PumpDeviceDefinition.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/defs/device/PumpDeviceHandler.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/device/DummyPump.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/device/accuchek/AccuChekPumpHandler.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/device/animas/AnimasIR1200Handler.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/device/animas/impl/AnimasPumpDeviceReader.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/device/animas/impl/handler/AnimasBaseDataV2Handler.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/device/dana/DanaDiabecare_III_R.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/device/dana/DanaPumpHandler.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/device/dana/DanaPumpHandlerV2.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/device/dana/impl/DanaDeviceReader.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/device/dana/impl/comm/DanaCommProtocolV1.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/device/insulet/InsuletHandler.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/device/insulet/InsuletReader.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/device/insulet/util/InsuletUtil.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/device/minimed/MinimedPumpDeviceHandler.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/device/minimed/old/MinimedSPMPump.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/gui/manual/PumpDataAdditionalWizardTwo.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/gui/manual/PumpDataDialog.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/gui/manual/PumpDataRowDialog.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/gui/manual/PumpDataTypeComponent.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/gui/manual/PumpDataTypeComponent2.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/gui/profile/ProfileEditor.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/gui/profile/ProfileEntryDialog.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/gui/profile/ProfileSelector.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/manager/PumpManager.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/report/PrintPumpDataAbstract.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/report/PrintPumpDataBase.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/report/PrintPumpDataExt.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/report/PrintPumpDataProfiles.java
trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/util/DataAccessPump.java
Added Paths:
-----------
trunk/ggc-plugins/ggc-pump/src/main/templates/
trunk/ggc-plugins/ggc-pump/src/main/templates/Version.java.template
Modified: trunk/ggc-plugins/ggc-pump/docs/Changelog
===================================================================
--- trunk/ggc-plugins/ggc-pump/docs/Changelog 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/docs/Changelog 2017-06-28 18:57:17 UTC (rev 1461)
@@ -2,6 +2,12 @@
Changes file for GGC Pump Tool
==============================
+2.0.3 [26.6.2017]
+- changed enums, so that translation are changed from withing DataAccess
+- refactorings
+- changes to Db Objects
+
+
2.0.2 [25.12.2016] [Andy]
- PumpDataAdditionalWizardTwo
- PumpDataTypeComponent
Modified: trunk/ggc-plugins/ggc-pump/pom.xml
===================================================================
--- trunk/ggc-plugins/ggc-pump/pom.xml 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/pom.xml 2017-06-28 18:57:17 UTC (rev 1461)
@@ -13,7 +13,35 @@
<version>${ggc-pump-tool.version}</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.google.code.maven-replacer-plugin</groupId>
+ <artifactId>maven-replacer-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.build.directory}/generated-sources/ggc/pump/defs/</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+
+
<dependencies>
<dependency>
<groupId>net.sf.ggc</groupId>
@@ -30,13 +58,11 @@
<artifactId>atech-tools</artifactId>
</dependency>
-
<dependency>
<groupId>com.ibm.old.comapi</groupId>
<artifactId>ibm-compapi</artifactId>
</dependency>
-
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
@@ -58,13 +84,14 @@
<artifactId>commons-collections</artifactId>
</dependency>
-
</dependencies>
+
<properties>
+ <version.file>
+ ${project.build.directory}/generated-sources/ggc/pump/defs/Version.java
+ </version.file>
+ </properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- </properties>
</project>
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpDataReader.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpDataReader.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpDataReader.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -64,7 +64,7 @@
public void getMaxEntries()
{
db = m_da.getDb();
- this.all_entries = db.getAllElementsCount();
+ this.allEntries = db.getAllElementsCount();
}
@@ -110,7 +110,7 @@
float proc_total = (proc * 1.0f + db_reading) / 160.0f * 100.0f;
int proc_total_i = (int) proc_total;
- this.m_drr.setOldDataReadingProgress(proc_total_i);
+ this.deviceReaderRunner.setOldDataReadingProgress(proc_total_i);
/*
* try
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpValuesEntry.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpValuesEntry.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpValuesEntry.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -86,7 +86,7 @@
public PumpValuesEntry(boolean tr)
{
// dataAccess = DataAccessPump.getInstance();
- // m_ic = dataAccess.getI18nControlInstance();
+ // i18nControl = dataAccess.getI18nControlInstance();
}
@@ -158,13 +158,13 @@
// this.entry_object = pdh;
this.id = pdh.getId();
this.old_id = pdh.getId();
- this.datetime = new ATechDate(ATechDateType.DateAndTimeSec, pdh.getDt_info());
- this.baseType = PumpBaseType.getByCode(pdh.getBase_type());
- this.sub_type = pdh.getSub_type();
+ this.datetime = new ATechDate(ATechDateType.DateAndTimeSec, pdh.getDtInfo());
+ this.baseType = PumpBaseType.getByCode(pdh.getBaseType());
+ this.sub_type = pdh.getSubType();
this.value = pdh.getValue();
this.extended = pdh.getExtended();
// loadExtended(pdh.getExtended());
- this.person_id = pdh.getPerson_id();
+ this.person_id = pdh.getPersonId();
this.comment = pdh.getComment();
}
@@ -756,7 +756,7 @@
// * this.entry_object = new DayValueH(); this.entry_object.setIns1(0);
// * this.entry_object.setIns2(0); this.entry_object.setCh(0.0f);
// * this.entry_object.setBg(Integer.parseInt(this.getBGValue(OutputUtil.
- // * BG_MGDL))); this.entry_object.setDt_info(this.datetime);
+ // * BG_MGDL))); this.entry_object.setDtInfo(this.datetime);
// * this.entry_object.setChanged(System.currentTimeMillis());
// * this.entry_object.setComment(createComment()); }
// */
@@ -829,12 +829,12 @@
PumpDataH pdh = new PumpDataH();
pdh.setId(this.id);
- pdh.setDt_info(this.datetime.getATDateTimeAsLong());
- pdh.setBase_type(this.baseType.getCode());
- pdh.setSub_type(this.sub_type);
+ pdh.setDtInfo(this.datetime.getATDateTimeAsLong());
+ pdh.setBaseType(this.baseType.getCode());
+ pdh.setSubType(this.sub_type);
pdh.setValue(this.value);
pdh.setExtended("SOURCE=" + this.source);
- pdh.setPerson_id((int) this.person_id);
+ pdh.setPersonId((int) this.person_id);
pdh.setComment(this.comment);
pdh.setChanged(System.currentTimeMillis());
pdh.setChanged(System.currentTimeMillis());
@@ -887,12 +887,12 @@
// System.out.println("PumpDataH: " + pdh);
pdh.setId(this.old_id);
- pdh.setDt_info(this.datetime.getATDateTimeAsLong());
- pdh.setBase_type(this.baseType.getCode());
- pdh.setSub_type(this.sub_type);
+ pdh.setDtInfo(this.datetime.getATDateTimeAsLong());
+ pdh.setBaseType(this.baseType.getCode());
+ pdh.setSubType(this.sub_type);
pdh.setValue(this.value);
pdh.setExtended(this.extended);
- pdh.setPerson_id((int) this.person_id);
+ pdh.setPersonId((int) this.person_id);
pdh.setComment(this.comment);
pdh.setChanged(System.currentTimeMillis());
@@ -917,12 +917,12 @@
PumpDataH pdh = (PumpDataH) sess.get(PumpDataH.class, this.id);
this.id = pdh.getId();
- this.datetime = new ATechDate(ATechDate.FORMAT_DATE_AND_TIME_S, pdh.getDt_info());
- this.baseType = PumpBaseType.getByCode(pdh.getBase_type());
- this.sub_type = pdh.getSub_type();
+ this.datetime = new ATechDate(ATechDate.FORMAT_DATE_AND_TIME_S, pdh.getDtInfo());
+ this.baseType = PumpBaseType.getByCode(pdh.getBaseType());
+ this.sub_type = pdh.getSubType();
this.value = pdh.getValue();
this.extended = pdh.getExtended();
- this.person_id = pdh.getPerson_id();
+ this.person_id = pdh.getPersonId();
this.comment = pdh.getComment();
return true;
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpValuesEntryExt.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpValuesEntryExt.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpValuesEntryExt.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -95,7 +95,7 @@
public PumpValuesEntryExt(String src)
{
this.source = (src == null) ? da.getSourceDevice() : src;
- this.setPerson_id(da.getCurrentUserIdAsInt());
+ this.setPersonId(da.getCurrentUserIdAsInt());
}
@@ -109,12 +109,12 @@
// pumpAdditionalDataType = new PumpAdditionalDataType();
this.setId(pd.getId());
- this.setDt_info(pd.getDt_info());
+ this.setDtInfo(pd.getDtInfo());
this.setType(pd.getType());
this.setValue(pd.getValue());
this.setExtended(pd.getExtended());
- this.setPerson_id(pd.getPerson_id());
+ this.setPersonId(pd.getPersonId());
this.setComment(pd.getComment());
this.setChanged(pd.getChanged());
@@ -157,7 +157,7 @@
*/
public ATechDate getDateTimeObject()
{
- return new ATechDate(ATechDate.FORMAT_DATE_AND_TIME_S, this.getDt_info());
+ return new ATechDate(ATechDate.FORMAT_DATE_AND_TIME_S, this.getDtInfo());
}
@@ -266,11 +266,11 @@
PumpDataExtendedH ch = new PumpDataExtendedH();
// ch.setId(id);
- ch.setDt_info(this.getDt_info());
+ ch.setDtInfo(this.getDtInfo());
ch.setType(this.getType());
ch.setValue(this.getValue());
ch.setExtended("SOURCE=" + this.source);
- ch.setPerson_id(this.getPerson_id());
+ ch.setPersonId(this.getPersonId());
ch.setComment(this.getComment());
ch.setChanged(System.currentTimeMillis());
@@ -312,11 +312,11 @@
// TODO: changed check
// ch.setId(id);
- ch.setDt_info(this.getDt_info());
+ ch.setDtInfo(this.getDtInfo());
ch.setType(this.getType());
ch.setValue(this.getValue());
ch.setExtended(this.getExtended());
- ch.setPerson_id(this.getPerson_id());
+ ch.setPersonId(this.getPersonId());
ch.setComment(this.getComment());
ch.setChanged(System.currentTimeMillis());
@@ -393,11 +393,11 @@
* @param dt_info
*/
@Override
- public void setDt_info(long dt_info)
+ public void setDtInfo(long dt_info)
{
- if (dt_info != getDt_info())
+ if (dt_info != getDtInfo())
{
- super.setDt_info(dt_info);
+ super.setDtInfo(dt_info);
changed = true;
}
}
@@ -426,7 +426,7 @@
*/
public long getDateTime()
{
- return this.getDt_info();
+ return this.getDtInfo();
}
@@ -448,7 +448,7 @@
*/
public void setDateTimeObject(ATechDate dt)
{
- this.setDt_info(dt.getATDateTimeAsLong());
+ this.setDtInfo(dt.getATDateTimeAsLong());
}
@@ -524,7 +524,7 @@
*/
public String getSpecialId()
{
- return "PE_" + this.getDt_info() + "_" + this.getType();
+ return "PE_" + this.getDtInfo() + "_" + this.getType();
}
@@ -840,7 +840,7 @@
// this.getType());
//
// if (map != -1)
- // return new GraphValue(this.getDt_info(), map, this.getValue());
+ // return new GraphValue(this.getDtInfo(), map, this.getValue());
// else
return null;
}
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpValuesEntryProfile.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpValuesEntryProfile.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/PumpValuesEntryProfile.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -123,12 +123,12 @@
{
this.setId(pd.getId());
this.setName(pd.getName());
- this.setBasal_base(pd.getBasal_base());
- this.setBasal_diffs(pd.getBasal_diffs());
- this.setActive_from(pd.getActive_from());
- this.setActive_till(pd.getActive_till());
+ this.setBasalBase(pd.getBasalBase());
+ this.setBasalDiffs(pd.getBasalDiffs());
+ this.setActiveFrom(pd.getActiveFrom());
+ this.setActiveTill(pd.getActiveTill());
this.setExtended(pd.getExtended());
- this.setPerson_id(pd.getPerson_id());
+ this.setPersonId(pd.getPersonId());
this.setComment(pd.getComment());
this.setChanged(pd.getChanged());
}
@@ -163,7 +163,7 @@
*/
public ATechDate getDateTimeObject()
{
- return new ATechDate(ATechDate.FORMAT_DATE_AND_TIME_S, this.getActive_from());
+ return new ATechDate(ATechDate.FORMAT_DATE_AND_TIME_S, this.getActiveFrom());
}
/*
@@ -232,7 +232,7 @@
* //
* this.entry_object.setBg(Integer.parseInt(this.getBGValue(OutputUtil
* .BG_MGDL)));
- * // this.entry_object.setDt_info(this.datetime);
+ * // this.entry_object.setDtInfo(this.datetime);
* this.entry_object.setChanged(System.currentTimeMillis());
* // this.entry_object.setComment(createComment());
* }
@@ -310,7 +310,7 @@
this.value_multiline = s_multi;
- this.setBasal_diffs(s);
+ this.setBasalDiffs(s);
}
@@ -331,7 +331,7 @@
public String toString()
{
// OutputUtil o= null;
- return "PumpValueEntryProfile [id=" + this.getId() + "] " + this.getBasal_diffs();
+ return "PumpValueEntryProfile [id=" + this.getId() + "] " + this.getBasalDiffs();
}
@@ -346,12 +346,12 @@
pd.setId(this.getId());
pd.setName(this.getName());
- pd.setBasal_base(this.getBasal_base());
- pd.setBasal_diffs(this.getBasal_diffs());
- pd.setActive_from(this.getActive_from());
- pd.setActive_till(this.getActive_till());
+ pd.setBasalBase(this.getBasalBase());
+ pd.setBasalDiffs(this.getBasalDiffs());
+ pd.setActiveFrom(this.getActiveFrom());
+ pd.setActiveTill(this.getActiveTill());
pd.setExtended("SOURCE=" + this.source);
- pd.setPerson_id(this.getPerson_id());
+ pd.setPersonId(this.getPersonId());
pd.setComment(this.getComment());
pd.setChanged(System.currentTimeMillis());
@@ -391,12 +391,12 @@
// pd.setId(this.getId());
pd.setName(this.getName());
- pd.setBasal_base(this.getBasal_base());
- pd.setBasal_diffs(this.getBasal_diffs());
- pd.setActive_from(this.getActive_from());
- pd.setActive_till(this.getActive_till());
+ pd.setBasalBase(this.getBasalBase());
+ pd.setBasalDiffs(this.getBasalDiffs());
+ pd.setActiveFrom(this.getActiveFrom());
+ pd.setActiveTill(this.getActiveTill());
pd.setExtended(this.getExtended());
- pd.setPerson_id(this.getPerson_id());
+ pd.setPersonId(this.getPersonId());
pd.setComment(this.getComment());
pd.setChanged(System.currentTimeMillis());
@@ -414,12 +414,12 @@
this.setId(pd.getId());
this.setName(pd.getName());
- this.setBasal_base(pd.getBasal_base());
- this.setBasal_diffs(pd.getBasal_diffs());
- this.setActive_from(pd.getActive_from());
- this.setActive_till(pd.getActive_till());
+ this.setBasalBase(pd.getBasalBase());
+ this.setBasalDiffs(pd.getBasalDiffs());
+ this.setActiveFrom(pd.getActiveFrom());
+ this.setActiveTill(pd.getActiveTill());
this.setExtended(pd.getExtended());
- this.setPerson_id(pd.getPerson_id());
+ this.setPersonId(pd.getPersonId());
this.setComment(pd.getComment());
this.setChanged(pd.getChanged());
@@ -524,7 +524,7 @@
case 3:
return ""; // ATechDate.getDateTimeString(this.getDateTimeFormat(),
- // this.getActive_till());
+ // this.getActiveTill());
case 4:
return this.getValue();
@@ -554,9 +554,9 @@
case OutputWriterType.CONSOLE:
case OutputWriterType.FILE:
return "Profile=" + this.getName() + ", From="
- + ATechDate.getDateTimeString(ATechDate.FORMAT_DATE_AND_TIME_S, this.getActive_from())
+ + ATechDate.getDateTimeString(ATechDate.FORMAT_DATE_AND_TIME_S, this.getActiveFrom())
+ ", Till="
- + ATechDate.getDateTimeString(ATechDate.FORMAT_DATE_AND_TIME_S, this.getActive_till());
+ + ATechDate.getDateTimeString(ATechDate.FORMAT_DATE_AND_TIME_S, this.getActiveTill());
case OutputWriterType.GGC_FILE_EXPORT:
{
@@ -590,7 +590,7 @@
*/
public String getSpecialId()
{
- return "PP_" + this.getActive_from() + "_" + this.getName();
+ return "PP_" + this.getActiveFrom() + "_" + this.getName();
}
@@ -613,7 +613,7 @@
public String getValue()
{
// this.processProfileSubEntries(1);
- return this.getBasal_diffs();
+ return this.getBasalDiffs();
}
@@ -624,7 +624,7 @@
*/
public long getDateTime()
{
- return this.getActive_from();
+ return this.getActiveFrom();
}
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpAdditionalDataType.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpAdditionalDataType.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpAdditionalDataType.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -9,7 +9,6 @@
import com.atech.utils.data.CodeEnumWithTranslation;
import ggc.pump.data.PumpValuesEntryExt;
-import ggc.pump.util.DataAccessPump;
/**
* Application: GGC - GNU Gluco Control
@@ -51,7 +50,7 @@
/**
* Additional data description
*/
- public static String[] addata_desc = null;
+ public static String[] descriptions = null;
/**
@@ -62,7 +61,7 @@
*/
public String getTypeDescription(int idx)
{
- return this.addata_desc[idx];
+ return this.descriptions[idx];
}
@@ -73,7 +72,7 @@
*/
public String[] getDescriptions()
{
- return this.addata_desc;
+ return this.descriptions;
}
static Map<String, CodeEnumWithTranslation> translationMapping = new HashMap<String, CodeEnumWithTranslation>();
@@ -81,26 +80,42 @@
static
{
- I18nControlAbstract ic = DataAccessPump.getInstance().getI18nControlInstance();
+ for (PumpAdditionalDataType pbt : values())
+ {
+ codeMapping.put(pbt.code, pbt);
+ }
+ }
+
+ public static void translateKeywords(I18nControlAbstract ic)
+ {
+ if (translated)
+ return;
+
for (PumpAdditionalDataType pbt : values())
{
pbt.setTranslation(ic.getMessage(pbt.i18nKey));
translationMapping.put(pbt.getTranslation(), pbt);
- codeMapping.put(pbt.code, pbt);
}
- String[] addata_desc_lcl = { ic.getMessage("SELECT_ADDITIONAL_DATA"), ic.getMessage("ADD_DATA_ACTIVITY"),
- ic.getMessage("ADD_DATA_COMMENT"), ic.getMessage("ADD_DATA_BG"),
- ic.getMessage("ADD_DATA_URINE"), ic.getMessage("ADD_DATA_CH"),
- ic.getMessage("ADD_DATA_FOOD_DB"), ic.getMessage("ADD_DATA_FOOD_DESC"), };
+ String[] additionalDataDescriptions = { ic.getMessage("SELECT_ADDITIONAL_DATA"), //
+ ic.getMessage("ADD_DATA_ACTIVITY"), //
+ ic.getMessage("ADD_DATA_COMMENT"), //
+ ic.getMessage("ADD_DATA_BG"), //
+ ic.getMessage("ADD_DATA_URINE"), //
+ ic.getMessage("ADD_DATA_CH"), //
+ ic.getMessage("ADD_DATA_FOOD_DB"), //
+ ic.getMessage("ADD_DATA_FOOD_DESC"), };
- addata_desc = addata_desc_lcl;
+ descriptions = additionalDataDescriptions;
+
+ translated = true;
}
int code;
String i18nKey;
String translation;
+ static boolean translated = false;
private PumpAdditionalDataType(int code, String i18nKey)
@@ -170,11 +185,11 @@
{
ArrayList<String> items = new ArrayList<String>();
- for (int i = 1; i < addata_desc.length; i++)
+ for (int i = 1; i < descriptions.length; i++)
{
- if (!old_data.containsKey(addata_desc[i]))
+ if (!old_data.containsKey(descriptions[i]))
{
- items.add(addata_desc[i]);
+ items.add(descriptions[i]);
}
}
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpAlarms.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpAlarms.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpAlarms.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -8,8 +8,6 @@
import com.atech.utils.ATDataAccess;
import com.atech.utils.data.CodeEnumWithTranslation;
-import ggc.pump.util.DataAccessPump;
-
/**
* Application: GGC - GNU Gluco Control Plug-in: Pump Tool (support for Pump
* devices)
@@ -59,8 +57,61 @@
int code;
String i18nKey;
String translation;
+ static boolean translated = false;
+ static Map<Integer, PumpAlarms> alarmCodeMapping = new HashMap<Integer, PumpAlarms>();
+ static Map<String, CodeEnumWithTranslation> translationMap = new HashMap<String, CodeEnumWithTranslation>();
+ static String[] descriptions;
+ static
+ {
+ for (PumpAlarms pbt : values())
+ {
+ alarmCodeMapping.put(pbt.code, pbt);
+ }
+ }
+
+
+ public static void translateKeywords(I18nControlAbstract ic)
+ {
+ if (translated)
+ return;
+
+ for (PumpAlarms pbt : values())
+ {
+ pbt.setTranslation(ic.getMessage(pbt.i18nKey));
+ translationMap.put(pbt.getTranslation(), pbt);
+ }
+
+ String[] alarmDescriptions = { ic.getMessage("SELECT_SUBTYPE"), //
+ ic.getMessage("ALARM_CARTRIDGE_LOW"), //
+ ic.getMessage("ALARM_BATTERY_LOW"), //
+ ic.getMessage("ALARM_REPLACE_BATTERY"), //
+ ic.getMessage("ALARM_REVIEW_DATETIME"), //
+ ic.getMessage("ALARM_ALARM_CLOCK"), //
+ ic.getMessage("ALARM_PUMP_TIMER"), //
+ ic.getMessage("ALARM_TEMPORARY_BASAL_RATE_CANCELED"), //
+ ic.getMessage("ALARM_TEMPORARY_BASAL_RATE_OVER"), //
+ ic.getMessage("ALARM_BOLUS_CANCELED"), //
+ ic.getMessage("ALARM_NO_DELIVERY"), //
+ ic.getMessage("ALARM_EMPTY_CARTRIDGE"), //
+ ic.getMessage("ALARM_AUTO_OFF"), //
+ ic.getMessage("ALARM_CALL_SERVICE"),//
+ };
+
+ descriptions = alarmDescriptions;
+
+ translated = true;
+ }
+
+
+ PumpAlarms(int code, String i18nKey)
+ {
+ this.code = code;
+ this.i18nKey = i18nKey;
+ }
+
+
public int getCode()
{
return code;
@@ -90,49 +141,7 @@
return this.name();
}
- static Map<Integer, PumpAlarms> alarmCodeMapping = new HashMap<Integer, PumpAlarms>();
- static Map<String, CodeEnumWithTranslation> translationMap = new HashMap<String, CodeEnumWithTranslation>();
- static String[] alarm_desc;
- static
- {
- I18nControlAbstract ic = DataAccessPump.getInstance().getI18nControlInstance();
-
- for (PumpAlarms pbt : values())
- {
- pbt.setTranslation(ic.getMessage(pbt.i18nKey));
- translationMap.put(pbt.getTranslation(), pbt);
- alarmCodeMapping.put(pbt.code, pbt);
- }
-
- String[] alarm_desc_lcl = { ic.getMessage("SELECT_SUBTYPE"), //
- ic.getMessage("ALARM_CARTRIDGE_LOW"), //
- ic.getMessage("ALARM_BATTERY_LOW"), //
- ic.getMessage("ALARM_REPLACE_BATTERY"), //
- ic.getMessage("ALARM_REVIEW_DATETIME"), //
- ic.getMessage("ALARM_ALARM_CLOCK"), //
- ic.getMessage("ALARM_PUMP_TIMER"), //
- ic.getMessage("ALARM_TEMPORARY_BASAL_RATE_CANCELED"), //
- ic.getMessage("ALARM_TEMPORARY_BASAL_RATE_OVER"), //
- ic.getMessage("ALARM_BOLUS_CANCELED"), //
- ic.getMessage("ALARM_NO_DELIVERY"), //
- ic.getMessage("ALARM_EMPTY_CARTRIDGE"), //
- ic.getMessage("ALARM_AUTO_OFF"), //
- ic.getMessage("ALARM_CALL_SERVICE"),//
- };
-
- alarm_desc = alarm_desc_lcl;
-
- }
-
-
- private PumpAlarms(int code, String i18nKey)
- {
- this.code = code;
- this.i18nKey = i18nKey;
- }
-
-
public static PumpAlarms getByCode(int code)
{
if (alarmCodeMapping.containsKey(code))
@@ -148,7 +157,7 @@
public static String[] getDescriptions()
{
- return alarm_desc;
+ return descriptions;
}
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpBasalType.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpBasalType.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpBasalType.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -7,8 +7,6 @@
import com.atech.utils.ATDataAccessAbstract;
import com.atech.utils.data.CodeEnumWithTranslation;
-import ggc.pump.util.DataAccessPump;
-
/**
* Application: GGC - GNU Gluco Control
* Plug-in: Pump Tool (support for Pump devices)
@@ -56,14 +54,13 @@
public static boolean isTemporaryBasalType(PumpBasalType type)
{
- return (type == TemporaryBasalRate || type == TemporaryBasalRateProfile || type == TemporaryBasalRateCanceled
- || type == TemporaryBasalRateEnded);
+ return (type == TemporaryBasalRate || type == TemporaryBasalRateProfile || type == TemporaryBasalRateCanceled || type == TemporaryBasalRateEnded);
}
/**
* Basal Descriptions
*/
- public static String[] basal_desc = null;
+ public static String[] descriptions = null;
static Map<String, CodeEnumWithTranslation> translationMapping = new HashMap<String, CodeEnumWithTranslation>();
static Map<Integer, PumpBasalType> codeMapping = new HashMap<Integer, PumpBasalType>();
@@ -70,34 +67,47 @@
static
{
- I18nControlAbstract ic = DataAccessPump.getInstance().getI18nControlInstance();
+ for (PumpBasalType pbt : values())
+ {
+ codeMapping.put(pbt.code, pbt);
+ }
+ }
+
+ public static void translateKeywords(I18nControlAbstract ic)
+ {
+ if (translated)
+ return;
+
for (PumpBasalType pbt : values())
{
pbt.setTranslation(ic.getMessage(pbt.i18nKey));
translationMapping.put(pbt.getTranslation(), pbt);
- codeMapping.put(pbt.code, pbt);
}
- String[] basal_desc_lcl = { ic.getMessage("SELECT_BASAL_TYPE"), ic.getMessage("BASAL_VALUE"), //
- ic.getMessage("BASAL_PROFILE"), //
- ic.getMessage("BASAL_TEMPORARY_BASAL_RATE"), //
- ic.getMessage("BASAL_TEMPORARY_BASAL_RATE_PROFILE"), //
- ic.getMessage("BASAL_PUMP_STATUS"), //
- ic.getMessage("BASAL_TEMPORARY_BASAL_RATE_ENDED"), //
- ic.getMessage("BASAL_TEMPORARY_BASAL_RATE_CANCELED"),
- ic.getMessage("BASAL_VALUE_CHANGE"), //
+ String[] basalDescriptions = { ic.getMessage("SELECT_BASAL_TYPE"),
+ ic.getMessage("BASAL_VALUE"), //
+ ic.getMessage("BASAL_PROFILE"), //
+ ic.getMessage("BASAL_TEMPORARY_BASAL_RATE"), //
+ ic.getMessage("BASAL_TEMPORARY_BASAL_RATE_PROFILE"), //
+ ic.getMessage("BASAL_PUMP_STATUS"), //
+ ic.getMessage("BASAL_TEMPORARY_BASAL_RATE_ENDED"), //
+ ic.getMessage("BASAL_TEMPORARY_BASAL_RATE_CANCELED"),
+ ic.getMessage("BASAL_VALUE_CHANGE"), //
};
- basal_desc = basal_desc_lcl;
+ descriptions = basalDescriptions;
+
+ translated = true;
}
int code;
String i18nKey;
String translation;
+ static boolean translated = false;
- private PumpBasalType(int code, String i18nKey)
+ PumpBasalType(int code, String i18nKey)
{
this.code = code;
this.i18nKey = i18nKey;
@@ -167,7 +177,7 @@
*/
public static String[] getDescriptions()
{
- return basal_desc;
+ return descriptions;
}
}
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpBaseType.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpBaseType.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpBaseType.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -5,8 +5,6 @@
import com.atech.i18n.I18nControlAbstract;
import com.atech.utils.data.CodeEnumWithTranslation;
-import ggc.pump.util.DataAccessPump;
-
/**
* Application: GGC - GNU Gluco Control Plug-in: Pump Tool (support for Pump
* devices)
@@ -54,12 +52,8 @@
static
{
- I18nControlAbstract ic = DataAccessPump.getInstance().getI18nControlInstance();
-
for (PumpBaseType pbt : values())
{
- pbt.setTranslation(ic.getMessage(pbt.i18nKey));
- basetypeTranslationMapping.put(pbt.getTranslation(), pbt);
basetypeCodeMapping.put(pbt.code, pbt);
}
}
@@ -67,8 +61,24 @@
int code;
String i18nKey;
String translation;
+ static boolean translated = false;
+ public static void translateKeywords(I18nControlAbstract ic)
+ {
+ if (translated)
+ return;
+
+ for (PumpBaseType pbt : values())
+ {
+ pbt.setTranslation(ic.getMessage(pbt.i18nKey));
+ basetypeTranslationMapping.put(pbt.getTranslation(), pbt);
+ }
+
+ translated = true;
+ }
+
+
public String getTranslation()
{
return translation;
@@ -99,7 +109,7 @@
}
- private PumpBaseType(int code, String i18nKey)
+ PumpBaseType(int code, String i18nKey)
{
this.code = code;
this.i18nKey = i18nKey;
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpBolusType.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpBolusType.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpBolusType.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -6,8 +6,6 @@
import com.atech.utils.ATDataAccess;
import com.atech.utils.data.CodeEnumWithTranslation;
-import ggc.pump.util.DataAccessPump;
-
/**
* Application: GGC - GNU Gluco Control
* Plug-in: Pump Tool (support for Pump devices)
@@ -44,36 +42,40 @@
;
- static String[] bolus_desc;
+ static String[] descriptions;
static HashMap<String, CodeEnumWithTranslation> translationMapping = new HashMap<String, CodeEnumWithTranslation>();
static HashMap<Integer, PumpBolusType> codeMapping = new HashMap<Integer, PumpBolusType>();
+ private static boolean translated;
static
{
- I18nControlAbstract ic = DataAccessPump.getInstance().getI18nControlInstance();
+ for (PumpBolusType pbt : values())
+ {
+ codeMapping.put(pbt.code, pbt);
+ }
+ }
+
+ public static void translateKeywords(I18nControlAbstract ic)
+ {
+ if (translated)
+ return;
+
for (PumpBolusType pbt : values())
{
pbt.setTranslation(ic.getMessage(pbt.i18nKey));
translationMapping.put(pbt.getTranslation(), pbt);
- codeMapping.put(pbt.code, pbt);
-
- // System.out.println("Tr: " + i18nControl.getMessage(pbt.i18nKey));
}
- String[] bolus_desc_lcl = { ic.getMessage("SELECT_BOLUS_TYPE"), //
- ic.getMessage("BOLUS_STANDARD"), //
- ic.getMessage("BOLUS_AUDIO"), //
- ic.getMessage("BOLUS_SQUARE"), //
- ic.getMessage("BOLUS_MULTIWAVE"), };
+ String[] bolusDescriptions = { ic.getMessage("SELECT_BOLUS_TYPE"), //
+ ic.getMessage("BOLUS_STANDARD"), //
+ ic.getMessage("BOLUS_AUDIO"), //
+ ic.getMessage("BOLUS_SQUARE"), //
+ ic.getMessage("BOLUS_MULTIWAVE"), };
- bolus_desc = bolus_desc_lcl;
+ descriptions = bolusDescriptions;
- // for(String s : bolus_desc_lcl)
- // {
- // System.out.println("Tr: " + s);
- // }
-
+ translated = true;
}
int code;
@@ -82,7 +84,7 @@
String valueTemplate;
- private PumpBolusType(int code, String i18nKey)
+ PumpBolusType(int code, String i18nKey)
{
this.code = code;
this.i18nKey = i18nKey;
@@ -89,7 +91,7 @@
}
- private PumpBolusType(int code, String i18nKey, String valueTemplate)
+ PumpBolusType(int code, String i18nKey, String valueTemplate)
{
this.code = code;
this.i18nKey = i18nKey;
@@ -160,6 +162,6 @@
*/
public static String[] getDescriptions()
{
- return bolus_desc;
+ return descriptions;
}
}
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpConfigurationGroup.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpConfigurationGroup.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpConfigurationGroup.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -7,7 +7,6 @@
import com.atech.utils.data.CodeEnumWithTranslation;
import ggc.plugin.data.enums.DeviceConfigurationGroup;
-import ggc.pump.util.DataAccessPump;
/**
* Created by andy on 27.02.15.
@@ -31,18 +30,14 @@
int code;
String i18nKey;
String translation;
+ static boolean translated;
static
{
- I18nControlAbstract ic = DataAccessPump.getInstance().getI18nControlInstance();
-
for (PumpConfigurationGroup pbt : values())
{
- pbt.setTranslation(ic.getMessage(pbt.i18nKey));
- translationMapping.put(pbt.getTranslation(), pbt);
codeMapping.put(pbt.code, pbt);
}
-
}
@@ -53,6 +48,21 @@
}
+ public static void translateKeywords(I18nControlAbstract ic)
+ {
+ if (translated)
+ return;
+
+ for (PumpConfigurationGroup pbt : values())
+ {
+ pbt.setTranslation(ic.getMessage(pbt.i18nKey));
+ translationMapping.put(pbt.getTranslation(), pbt);
+ }
+
+ translated = true;
+ }
+
+
public String getTranslation()
{
return translation;
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpErrors.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpErrors.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpErrors.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -8,8 +8,6 @@
import com.atech.utils.ATDataAccessAbstract;
import com.atech.utils.data.CodeEnumWithTranslation;
-import ggc.pump.util.DataAccessPump;
-
/**
* Application: GGC - GNU Gluco Control
* Plug-in: Pump Tool (support for Pump devices)
@@ -73,36 +71,48 @@
static
{
- I18nControlAbstract ic = DataAccessPump.getInstance().getI18nControlInstance();
+ for (PumpErrors pbt : values())
+ {
+ codeMapping.put(pbt.code, pbt);
+ }
+ }
+
+ public static void translateKeywords(I18nControlAbstract ic)
+ {
+ if (translated)
+ return;
+
for (PumpErrors pbt : values())
{
pbt.setTranslation(ic.getMessage(pbt.i18nKey));
translationMapping.put(pbt.getTranslation(), pbt);
- codeMapping.put(pbt.code, pbt);
}
String[] errors_desc_lcl = { ic.getMessage("SELECT_SUBTYPE"), //
- ic.getMessage("ERROR_CARTRIDGE_EMPTY"), //
- ic.getMessage("ERROR_BATTERY_DEPLETED"), //
- ic.getMessage("ERROR_AUTOMATIC_OFF"), //
- ic.getMessage("ERROR_NO_DELIVERY"), //
- ic.getMessage("ERROR_END_OF_OPERATION"), //
- ic.getMessage("ERROR_MECHANICAL_ERROR"), //
- ic.getMessage("ERROR_ELECTRONIC_ERROR"), //
- ic.getMessage("ERROR_POWER_INTERRUPT"), //
- ic.getMessage("ERROR_CARTRIDGE_ERROR"), //
- ic.getMessage("ERROR_SET_NOT_PRIMED"), //
- ic.getMessage("ERROR_DATA_INTERRUPTED"), //
- ic.getMessage("ERROR_LANGUAGE_ERROR"), //
- ic.getMessage("ERROR_INSULIN_CHANGED"), };
+ ic.getMessage("ERROR_CARTRIDGE_EMPTY"), //
+ ic.getMessage("ERROR_BATTERY_DEPLETED"), //
+ ic.getMessage("ERROR_AUTOMATIC_OFF"), //
+ ic.getMessage("ERROR_NO_DELIVERY"), //
+ ic.getMessage("ERROR_END_OF_OPERATION"), //
+ ic.getMessage("ERROR_MECHANICAL_ERROR"), //
+ ic.getMessage("ERROR_ELECTRONIC_ERROR"), //
+ ic.getMessage("ERROR_POWER_INTERRUPT"), //
+ ic.getMessage("ERROR_CARTRIDGE_ERROR"), //
+ ic.getMessage("ERROR_SET_NOT_PRIMED"), //
+ ic.getMessage("ERROR_DATA_INTERRUPTED"), //
+ ic.getMessage("ERROR_LANGUAGE_ERROR"), //
+ ic.getMessage("ERROR_INSULIN_CHANGED"), };
errors_desc = errors_desc_lcl;
+
+ translated = true;
}
int code;
String i18nKey;
String translation;
+ static boolean translated = false;
private PumpErrors(int code, String i18nKey)
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpEventType.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpEventType.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpEventType.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -7,8 +7,6 @@
import com.atech.utils.ATDataAccessAbstract;
import com.atech.utils.data.CodeEnumWithTranslation;
-import ggc.pump.util.DataAccessPump;
-
/**
* Application: GGC - GNU Gluco Control
* Plug-in: Pump Tool (support for Pump devices)
@@ -78,10 +76,9 @@
BgFromMeter(70, "EVENT_BG_FROM_METER"), //
BolusCancelled(80, "ALARM_BOLUS_CANCELED"), //
- BolusWizard(81, "EVENT_BOLUS_WIZARD",
- "BG=%s;CH=%s;CH_UNIT=%s;"
- + "CH_INS_RATIO=%s;BG_INS_RATIO=%s;BG_TARGET_LOW=%s;BG_TARGET_HIGH=%s;BOLUS_TOTAL=%s;"
- + "BOLUS_CORRECTION=%s;BOLUS_FOOD=%s;UNABSORBED_INSULIN=%s"), //
+ BolusWizard(81, "EVENT_BOLUS_WIZARD", "BG=%s;CH=%s;CH_UNIT=%s;"
+ + "CH_INS_RATIO=%s;BG_INS_RATIO=%s;BG_TARGET_LOW=%s;BG_TARGET_HIGH=%s;BOLUS_TOTAL=%s;"
+ + "BOLUS_CORRECTION=%s;BOLUS_FOOD=%s;UNABSORBED_INSULIN=%s"), //
ChangeRemoteId(90, "EVENT_CHANGE_REMOTE_ID"), //
@@ -94,39 +91,50 @@
static
{
- I18nControlAbstract ic = DataAccessPump.getInstance().getI18nControlInstance();
+ for (PumpEventType pbt : values())
+ {
+ codeMapping.put(pbt.code, pbt);
+ }
+ }
+
+ public static void translateKeywords(I18nControlAbstract ic)
+ {
+ if (translated)
+ return;
+
for (PumpEventType pbt : values())
{
pbt.setTranslation(ic.getMessage(pbt.i18nKey));
translationMapping.put(pbt.getTranslation(), pbt);
- codeMapping.put(pbt.code, pbt);
}
String[] descriptions_lcl = { ic.getMessage("SELECT_SUBTYPE"), ic.getMessage("EVENT_PRIME_INFUSION_SET"),
- ic.getMessage("EVENT_CARTRIDGE_CHANGED"),
- ic.getMessage("EVENT_REWIND_INFUSION_SET"), ic.getMessage("EVENT_RESERVOIR_LOW"),
- ic.getMessage("EVENT_RESERVOIR_LOW_DESC"), ic.getMessage("EVENT_FILL_CANNULA"),
- ic.getMessage("EVENT_SET_TEMPORARY_BASAL_RATE_TYPE"),
- ic.getMessage("EVENT_SET_BASAL_PATTERN"), ic.getMessage("EVENT_BASAL_RUN"),
+ ic.getMessage("EVENT_CARTRIDGE_CHANGED"),
+ ic.getMessage("EVENT_REWIND_INFUSION_SET"), ic.getMessage("EVENT_RESERVOIR_LOW"),
+ ic.getMessage("EVENT_RESERVOIR_LOW_DESC"), ic.getMessage("EVENT_FILL_CANNULA"),
+ ic.getMessage("EVENT_SET_TEMPORARY_BASAL_RATE_TYPE"),
+ ic.getMessage("EVENT_SET_BASAL_PATTERN"), ic.getMessage("EVENT_BASAL_RUN"),
- ic.getMessage("EVENT_BASAL_STOP"), ic.getMessage("EVENT_POWER_DOWN"),
- ic.getMessage("EVENT_POWER_UP"), ic.getMessage("EVENT_SELF_TEST"),
- ic.getMessage("EVENT_DOWNLOAD"), ic.getMessage("EVENT_DATETIME_SET"),
- ic.getMessage("EVENT_DATETIME_CORRECT"),
+ ic.getMessage("EVENT_BASAL_STOP"), ic.getMessage("EVENT_POWER_DOWN"),
+ ic.getMessage("EVENT_POWER_UP"), ic.getMessage("EVENT_SELF_TEST"),
+ ic.getMessage("EVENT_DOWNLOAD"), ic.getMessage("EVENT_DATETIME_SET"),
+ ic.getMessage("EVENT_DATETIME_CORRECT"),
- ic.getMessage("EVENT_SET_MAX_BASAL"), //
- ic.getMessage("EVENT_SET_MAX_BOLUS"), //
- ic.getMessage("EVENT_BATERRY_REMOVED"), //
+ ic.getMessage("EVENT_SET_MAX_BASAL"), //
+ ic.getMessage("EVENT_SET_MAX_BOLUS"), //
+ ic.getMessage("EVENT_BATERRY_REMOVED"), //
- ic.getMessage("EVENT_BATERRY_REPLACED"), //
- ic.getMessage("EVENT_BATERRY_LOW"), //
- ic.getMessage("EVENT_BATERRY_LOW_DESC"), //
- ic.getMessage("EVENT_BG_FROM_METER"), //
- ic.getMessage("ALARM_BOLUS_CANCELED"), //
- ic.getMessage("EVENT_BOLUS_WIZARD") };
+ ic.getMessage("EVENT_BATERRY_REPLACED"), //
+ ic.getMessage("EVENT_BATERRY_LOW"), //
+ ic.getMessage("EVENT_BATERRY_LOW_DESC"), //
+ ic.getMessage("EVENT_BG_FROM_METER"), //
+ ic.getMessage("ALARM_BOLUS_CANCELED"), //
+ ic.getMessage("EVENT_BOLUS_WIZARD") };
descriptions = descriptions_lcl;
+
+ translated = true;
}
int code;
@@ -133,9 +141,10 @@
String i18nKey;
String translation;
private String valueTemplate;
+ static boolean translated = false;
- private PumpEventType(int code, String i18nKey)
+ PumpEventType(int code, String i18nKey)
{
this.code = code;
this.i18nKey = i18nKey;
@@ -142,7 +151,7 @@
}
- private PumpEventType(int code, String i18nKey, String valueTemplate)
+ PumpEventType(int code, String i18nKey, String valueTemplate)
{
this.code = code;
this.i18nKey = i18nKey;
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpReport.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpReport.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/PumpReport.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -6,8 +6,6 @@
import com.atech.utils.ATDataAccess;
import com.atech.utils.data.CodeEnumWithTranslation;
-import ggc.pump.util.DataAccessPump;
-
/**
* Application: GGC - GNU Gluco Control
* Plug-in: Pump Tool (support for Pump devices)
@@ -48,7 +46,7 @@
/**
* Report Descriptions
*/
- public static String[] report_desc = null;
+ public static String[] descriptions = null;
static HashMap<String, CodeEnumWithTranslation> translationMapping = new HashMap<String, CodeEnumWithTranslation>();
static HashMap<Integer, PumpReport> codeMapping = new HashMap<Integer, PumpReport>();
@@ -55,30 +53,42 @@
static
{
- I18nControlAbstract ic = DataAccessPump.getInstance().getI18nControlInstance();
+ for (PumpReport pbt : values())
+ {
+ codeMapping.put(pbt.code, pbt);
+ }
+ }
+
+ public static void translateKeywords(I18nControlAbstract ic)
+ {
+ if (translated)
+ return;
+
for (PumpReport pbt : values())
{
pbt.setTranslation(ic.getMessage(pbt.i18nKey));
translationMapping.put(pbt.getTranslation(), pbt);
- codeMapping.put(pbt.code, pbt);
}
- String[] report_desc_lcl = { ic.getMessage("SELECT_SUBTYPE"), //
- ic.getMessage("REPORT_MISC"), //
- ic.getMessage("REPORT_BOLUS_TOTAL_DAY"), //
- ic.getMessage("REPORT_BASAL_TOTAL_DAY"), //
- ic.getMessage("REPORT_INSULIN_TOTAL_DAY"), };
+ String[] reportDescriptions = { ic.getMessage("SELECT_SUBTYPE"), //
+ ic.getMessage("REPORT_MISC"), //
+ ic.getMessage("REPORT_BOLUS_TOTAL_DAY"), //
+ ic.getMessage("REPORT_BASAL_TOTAL_DAY"), //
+ ic.getMessage("REPORT_INSULIN_TOTAL_DAY"), };
- report_desc = report_desc_lcl;
+ descriptions = reportDescriptions;
+
+ translated = true;
}
int code;
String i18nKey;
String translation;
+ static boolean translated = false;
- private PumpReport(int code, String i18nKey)
+ PumpReport(int code, String i18nKey)
{
this.code = code;
this.i18nKey = i18nKey;
@@ -148,7 +158,7 @@
*/
public static String[] getDescriptions()
{
- return report_desc;
+ return descriptions;
}
}
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/RatioType.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/RatioType.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/defs/RatioType.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -4,7 +4,6 @@
import com.atech.utils.data.CodeEnumWithTranslation;
import ggc.plugin.data.enums.ValueType;
-import ggc.pump.util.DataAccessPump;
/**
* Application: GGC - GNU Gluco Control
@@ -54,15 +53,20 @@
String i18nKey;
String translation;
ValueType valueType;
+ static boolean translated = false;
- static
+
+ public static void translateKeywords(I18nControlAbstract ic)
{
- I18nControlAbstract ic = DataAccessPump.getInstance().getI18nControlInstance();
+ if (translated)
+ return;
for (RatioType pbt : values())
{
pbt.setTranslation(ic.getMessage(pbt.i18nKey));
}
+
+ translated = true;
}
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/graph/GraphViewBasalRateEstimator.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/graph/GraphViewBasalRateEstimator.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/graph/GraphViewBasalRateEstimator.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -186,16 +186,16 @@
* + hbValues.getPercentOfDaysInClass(2) + "\n" +
* hbValues.getPercentOfDaysInClass(3) + "\n"
* + hbValues.getPercentOfDaysInClass(4));
- * datasetBG.insertValue(0, m_ic.getMessage("DAYS_WITH_READINGS_0_1"),
+ * datasetBG.insertValue(0, i18nControl.getMessage("DAYS_WITH_READINGS_0_1"),
* hbValues.getPercentOfDaysInClass(0));
- * datasetBG.insertValue(1, m_ic.getMessage("DAYS_WITH_READINGS_2_3"),
+ * datasetBG.insertValue(1, i18nControl.getMessage("DAYS_WITH_READINGS_2_3"),
* hbValues.getPercentOfDaysInClass(1));
- * datasetBG.insertValue(2, m_ic.getMessage("DAYS_WITH_READINGS_4_5"),
+ * datasetBG.insertValue(2, i18nControl.getMessage("DAYS_WITH_READINGS_4_5"),
* hbValues.getPercentOfDaysInClass(2));
- * datasetBG.insertValue(3, m_ic.getMessage("DAYS_WITH_READINGS_6_7"),
+ * datasetBG.insertValue(3, i18nControl.getMessage("DAYS_WITH_READINGS_6_7"),
* hbValues.getPercentOfDaysInClass(3));
* datasetBG.insertValue(4,
- * m_ic.getMessage("DAYS_WITH_READINGS_MORE_7"),
+ * i18nControl.getMessage("DAYS_WITH_READINGS_MORE_7"),
* hbValues.getPercentOfDaysInClass(4));
*/
@@ -204,8 +204,8 @@
/*
* TimeSeries BGSeries = new
- * TimeSeries(this.m_ic.getMessage("BLOOD_GLUCOSE"), Hour.class);
- * TimeSeries CHSeries = new TimeSeries(this.m_ic.getMessage("CH_LONG"),
+ * TimeSeries(this.i18nControl.getMessage("BLOOD_GLUCOSE"), Hour.class);
+ * TimeSeries CHSeries = new TimeSeries(this.i18nControl.getMessage("CH_LONG"),
* Hour.class);
* TimeSeries ins1Series = new
* TimeSeries(dataAccessPump.getSettings().getIns1Name(), Hour.class);
@@ -216,7 +216,7 @@
XYSeries bg = new XYSeries(this.m_ic.getMessage("MEASURED_BASAL_BG"), true, true); // ,
// Hour.class);
- // XYSeries CHSeries = new XYSeries(this.m_ic.getMessage("CH_LONG"),
+ // XYSeries CHSeries = new XYSeries(this.i18nControl.getMessage("CH_LONG"),
// true, true); //, Hour.class);
// XYSeries ins1Series = new
// XYSeries(dataAccessPump.getSettings().getIns1Name(), true, true); //,
@@ -412,7 +412,7 @@
insBURenderer.setSeriesShapesVisible(2, true);
// AX dateAxis.setDateFormatOverride(new
- // SimpleDateFormat(m_ic.getMessage("FORMAT_DATE_HOURS")));
+ // SimpleDateFormat(i18nControl.getMessage("FORMAT_DATE_HOURS")));
// AX dateAxis.setAutoRange(false);
/*
* dateAxis.setRange(this.gluco_values.getRangeFrom().getTime(),
@@ -423,8 +423,8 @@
*/
// BGAxis.setAutoRangeIncludesZero(true);
- // ax insBUAxis.setLabel(m_ic.getMessage("CH_LONG") + " / " +
- // m_ic.getMessage("INSULIN"));
+ // ax insBUAxis.setLabel(i18nControl.getMessage("CH_LONG") + " / " +
+ // i18nControl.getMessage("INSULIN"));
// ax insBUAxis.setAutoRangeIncludesZero(true);
}
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/graph/GraphViewDailyPump.java
===================================================================
--- trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/graph/GraphViewDailyPump.java 2017-06-28 18:49:34 UTC (rev 1460)
+++ trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/graph/GraphViewDailyPump.java 2017-06-28 18:57:17 UTC (rev 1461)
@@ -26,7 +26,7 @@
import com.atech.utils.data.TimeZoneUtil;
import ggc.core.data.graph.v1.view.GraphViewCGMSDailyAbstract;
-import ggc.core.db.hibernate.ColorSchemeH;
+import ggc.core.db.hibernate.settings.ColorSchemeH;
import ggc.core.util.DataAccess;
import ggc.plugin.data.DeviceValuesDay;
import ggc.pump.data.PumpValuesEntry;
Modified: trunk/ggc-plugins/ggc-pump/src/main/java/ggc/pump/data/graph/bre/GraphViewBasal...
[truncated message content] |