dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40661
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20659: minor cleanups in DataElement
------------------------------------------------------------
revno: 20659
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-10-13 10:22:05 +0700
message:
minor cleanups in DataElement
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.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-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2015-10-05 17:45:17 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2015-10-13 03:22:05 +0000
@@ -219,15 +219,6 @@
}
/**
- * Indicates whether the value type of this data element is date.
- */
- public boolean isDateType()
- {
- // TODO optimize when using persisted valueType
- return ValueType.DATE == getValueType() || ValueType.DATETIME == getValueType();
- }
-
- /**
* Indicates whether the value type of this data element is a file (externally stored resource)
*/
public boolean isFileType()
@@ -315,7 +306,7 @@
*/
public Set<PeriodType> getPeriodTypes()
{
- return Sets.newHashSet( dataSets ).stream().map( dataSet -> dataSet.getPeriodType() ).collect( Collectors.toSet() );
+ return Sets.newHashSet( dataSets ).stream().map( DataSet::getPeriodType ).collect( Collectors.toSet() );
}
/**
@@ -426,14 +417,6 @@
}
/**
- * Returns the domain type, or the default domain type if it does not exist.
- */
- public String getDomainTypeNullSafe()
- {
- return domainType != null ? domainType.getValue() : DataElementDomain.AGGREGATE.getValue();
- }
-
- /**
* Returns the form name, or the name if it does not exist.
*/
public String getFormNameFallback()
@@ -441,8 +424,8 @@
return formName != null && !formName.isEmpty() ? getDisplayFormName() : getDisplayName();
}
+ @JsonProperty
@JsonView( { DetailedView.class, DimensionalView.class } )
- @JsonProperty
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public String getDisplayFormName()
{