dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15574
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5671: minor fixes
------------------------------------------------------------
revno: 5671
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-01-06 10:42:17 +0100
message:
minor fixes
modified:
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf2/model/DataValueSet.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf2/service/DataValueSetService.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf2/service/StaXDataValueImportService.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf2/model/DataValueSet.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf2/model/DataValueSet.java 2012-01-05 21:51:00 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf2/model/DataValueSet.java 2012-01-06 09:42:17 +0000
@@ -52,12 +52,12 @@
public static final String DATAVALUE = "dataValue";
- public enum IdentificationStrategy { INTERNAL, UUID, CODE };
+ public enum IdentificationStrategy { INTERNAL, UID, CODE };
/**
* A default strategy to use.
*/
- public static final IdentificationStrategy DEFAULT_STRATEGY = IdentificationStrategy.UUID;
+ public static final IdentificationStrategy DEFAULT_STRATEGY = IdentificationStrategy.UID;
@XmlAttribute( name = ATTR_DATASET )
private String dataSetIdentifier;
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf2/service/DataValueSetService.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf2/service/DataValueSetService.java 2011-12-08 12:34:45 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf2/service/DataValueSetService.java 2012-01-06 09:42:17 +0000
@@ -120,7 +120,7 @@
* <li>completed semantics: can't uncomplete but can complete and
* "recomplete"
* <li>what is 'comment' good for really?
- *
+ *
* @param dataValueSet
* @throws IllegalArgumentException if there are any inconsistencies
*/
@@ -134,7 +134,7 @@
IdentificationStrategy idStrategy = dataValueSet.getIdScheme();
if ( idStrategy != DataValueSet.DEFAULT_STRATEGY )
{
- throw new IllegalArgumentException( "Onlu UUID id strategy supported currently." );
+ throw new IllegalArgumentException( "Only UID id strategy supported currently." );
}
DataSet dataSet = getDataSet( dataValueSet );
@@ -143,8 +143,8 @@
if ( !dataSet.getSources().contains( unit ) )
{
- throw new IllegalArgumentException( "Org unit with UUID " + unit.getUid()
- + " does not report data set with UUID " + dataSet.getUid() );
+ throw new IllegalArgumentException( "Org unit with UID " + unit.getUid()
+ + " does not report data set with UID " + dataSet.getUid() );
}
Period period = getPeriod( dataValueSet.getPeriodIsoDate(), dataSet.getPeriodType() );
@@ -347,51 +347,51 @@
return period;
}
- private OrganisationUnit getOrgUnit( String id )
+ private OrganisationUnit getOrgUnit( String uid )
{
- OrganisationUnit unit = organisationUnitService.getOrganisationUnit( id );
+ OrganisationUnit unit = organisationUnitService.getOrganisationUnit( uid );
if ( unit == null )
{
- throw new IllegalArgumentException( "Org unit with UUID " + id + " does not exist" );
+ throw new IllegalArgumentException( "Org unit with UID " + uid + " does not exist" );
}
return unit;
}
- private DataElement getDataElement( String id )
+ private DataElement getDataElement( String uid )
{
- DataElement dataElement = dataElementService.getDataElement( id );
+ DataElement dataElement = dataElementService.getDataElement( uid );
if ( dataElement == null )
{
- throw new IllegalArgumentException( "Data element with UUID " + id + " does not exist" );
+ throw new IllegalArgumentException( "Data element with UID " + uid + " does not exist" );
}
return dataElement;
}
- private DataElementCategoryOptionCombo getOptionCombo( String uuid, DataElement dataElement )
+ private DataElementCategoryOptionCombo getOptionCombo( String uid, DataElement dataElement )
{
DataElementCategoryOptionCombo combo;
- if ( uuid == null )
+ if ( uid == null )
{
combo = categoryService.getDefaultDataElementCategoryOptionCombo();
}
else
{
- combo = categoryService.getDataElementCategoryOptionCombo( uuid );
+ combo = categoryService.getDataElementCategoryOptionCombo( uid );
}
if ( combo == null )
{
- throw new IllegalArgumentException( "DataElementCategoryOptionCombo with UUID '" + uuid
+ throw new IllegalArgumentException( "DataElementCategoryOptionCombo with UID '" + uid
+ "' does not exist" );
}
if ( !dataElement.getCategoryCombo().getOptionCombos().contains( combo ) )
{
- throw new IllegalArgumentException( "DataElementCategoryOptionCombo with UUID '" + combo.getUid()
+ throw new IllegalArgumentException( "DataElementCategoryOptionCombo with UID '" + combo.getUid()
+ "' isn't in DataElement '" + dataElement.getUid() + "'" );
}
return combo;
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf2/service/StaXDataValueImportService.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf2/service/StaXDataValueImportService.java 2011-12-30 15:49:52 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf2/service/StaXDataValueImportService.java 2012-01-06 09:42:17 +0000
@@ -453,7 +453,7 @@
OrganisationUnit ou;
switch ( idScheme )
{
- case UUID:
+ case UID:
ou = organisationUnitService.getOrganisationUnit( orgunit );
break;
case CODE: