dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21059
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9872: re-enabled dxf2 import/export in import/export module
------------------------------------------------------------
revno: 9872
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-02-22 13:30:40 +0700
message:
re-enabled dxf2 import/export in import/export module
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseNameableObject.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java
dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties
dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.vm
--
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/common/BaseNameableObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseNameableObject.java 2013-02-13 03:57:52 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseNameableObject.java 2013-02-22 06:30:40 +0000
@@ -27,19 +27,18 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.hisp.dhis.common.view.DetailedView;
-import org.hisp.dhis.common.view.ExportView;
-
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonView;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import org.hisp.dhis.common.view.DetailedView;
+import org.hisp.dhis.common.view.ExportView;
import org.hisp.dhis.common.view.ShortNameView;
/**
* @author Bob Jolliffe
*/
-@JacksonXmlRootElement( localName = "nameableObject", namespace = DxfNamespaces.DXF_2_0)
+@JacksonXmlRootElement(localName = "nameableObject", namespace = DxfNamespaces.DXF_2_0)
public class BaseNameableObject
extends BaseIdentifiableObject
implements NameableObject
@@ -78,7 +77,7 @@
}
public BaseNameableObject( int id, String uid, String name, String shortName,
- String code, String description )
+ String code, String description )
{
super( id, uid, name );
this.shortName = shortName;
@@ -111,8 +110,8 @@
}
@JsonProperty
- @JsonView( { ShortNameView.class, DetailedView.class, ExportView.class} )
- @JacksonXmlProperty( isAttribute = true )
+ @JsonView({ ShortNameView.class, DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(isAttribute = true)
public String getShortName()
{
return shortName;
@@ -124,8 +123,8 @@
}
@JsonProperty
- @JsonView( {DetailedView.class, ExportView.class} )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public String getDescription()
{
return description;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2013-02-19 13:19:21 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2013-02-22 06:30:40 +0000
@@ -27,18 +27,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.UUID;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonView;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import org.apache.commons.lang.StringUtils;
import org.hisp.dhis.attribute.AttributeValue;
import org.hisp.dhis.common.BaseIdentifiableObject;
@@ -52,17 +46,22 @@
import org.hisp.dhis.dataset.DataSet;
import org.hisp.dhis.user.User;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonView;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
/**
* @author Kristian Nordal
*/
-@JacksonXmlRootElement( localName = "organisationUnit", namespace = DxfNamespaces.DXF_2_0)
+@JacksonXmlRootElement(localName = "organisationUnit", namespace = DxfNamespaces.DXF_2_0)
public class OrganisationUnit
extends BaseNameableObject
{
@@ -165,7 +164,7 @@
public OrganisationUnit( String name, String shortName, String code, Date openingDate, Date closedDate,
boolean active, String comment )
{
- this(name);
+ this( name );
this.shortName = shortName;
this.code = code;
this.openingDate = openingDate;
@@ -186,7 +185,7 @@
public OrganisationUnit( String name, OrganisationUnit parent, String shortName, String code, Date openingDate,
Date closedDate, boolean active, String comment )
{
- this(name);
+ this( name );
this.parent = parent;
this.shortName = shortName;
this.code = code;
@@ -525,8 +524,8 @@
return set;
}
- @JsonProperty( "level" )
- @JacksonXmlProperty( localName = "level", isAttribute = true )
+ @JsonProperty("level")
+ @JacksonXmlProperty(localName = "level", isAttribute = true)
public int getOrganisationUnitLevel()
{
int currentLevel = 1;
@@ -621,9 +620,9 @@
}
@JsonProperty
- @JsonSerialize( as = BaseIdentifiableObject.class )
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JsonSerialize(as = BaseIdentifiableObject.class)
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public OrganisationUnit getParent()
{
return parent;
@@ -635,10 +634,10 @@
}
@JsonProperty
- @JsonSerialize( contentAs = BaseIdentifiableObject.class )
- @JsonView( { DetailedView.class } )
- @JacksonXmlElementWrapper( localName = "children", namespace = DxfNamespaces.DXF_2_0)
- @JacksonXmlProperty( localName = "child", namespace = DxfNamespaces.DXF_2_0)
+ @JsonSerialize(contentAs = BaseIdentifiableObject.class)
+ @JsonView({ DetailedView.class })
+ @JacksonXmlElementWrapper(localName = "children", namespace = DxfNamespaces.DXF_2_0)
+ @JacksonXmlProperty(localName = "child", namespace = DxfNamespaces.DXF_2_0)
public Set<OrganisationUnit> getChildren()
{
return children;
@@ -659,8 +658,8 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public Date getOpeningDate()
{
return openingDate;
@@ -672,8 +671,8 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public Date getClosedDate()
{
return closedDate;
@@ -685,8 +684,8 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public boolean isActive()
{
return active;
@@ -698,8 +697,8 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public String getComment()
{
return comment;
@@ -711,8 +710,8 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public String getGeoCode()
{
return geoCode;
@@ -724,8 +723,8 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public String getFeatureType()
{
return featureType;
@@ -737,8 +736,8 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public String getCoordinates()
{
return coordinates;
@@ -750,8 +749,8 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public String getUrl()
{
return url;
@@ -763,8 +762,8 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public String getContactPerson()
{
return contactPerson;
@@ -776,8 +775,8 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public String getAddress()
{
return address;
@@ -789,8 +788,8 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public String getEmail()
{
return email;
@@ -802,8 +801,8 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public String getPhoneNumber()
{
return phoneNumber;
@@ -815,8 +814,8 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public String getType()
{
return type;
@@ -827,11 +826,11 @@
this.type = type;
}
- @JsonProperty( value = "organisationUnitGroups" )
- @JsonSerialize( contentAs = BaseIdentifiableObject.class )
- @JsonView( { DetailedView.class } )
- @JacksonXmlElementWrapper( localName = "organisationUnitGroups", namespace = DxfNamespaces.DXF_2_0)
- @JacksonXmlProperty( localName = "organisationUnitGroup", namespace = DxfNamespaces.DXF_2_0)
+ @JsonProperty(value = "organisationUnitGroups")
+ @JsonSerialize(contentAs = BaseIdentifiableObject.class)
+ @JsonView({ DetailedView.class })
+ @JacksonXmlElementWrapper(localName = "organisationUnitGroups", namespace = DxfNamespaces.DXF_2_0)
+ @JacksonXmlProperty(localName = "organisationUnitGroup", namespace = DxfNamespaces.DXF_2_0)
public Set<OrganisationUnitGroup> getGroups()
{
return groups;
@@ -843,10 +842,10 @@
}
@JsonProperty
- @JsonSerialize( contentAs = BaseIdentifiableObject.class )
- @JsonView( { DetailedView.class } )
- @JacksonXmlElementWrapper( localName = "dataSets", namespace = DxfNamespaces.DXF_2_0)
- @JacksonXmlProperty( localName = "dataSet", namespace = DxfNamespaces.DXF_2_0)
+ @JsonSerialize(contentAs = BaseIdentifiableObject.class)
+ @JsonView({ DetailedView.class })
+ @JacksonXmlElementWrapper(localName = "dataSets", namespace = DxfNamespaces.DXF_2_0)
+ @JacksonXmlProperty(localName = "dataSet", namespace = DxfNamespaces.DXF_2_0)
public Set<DataSet> getDataSets()
{
return dataSets;
@@ -858,10 +857,10 @@
}
@JsonProperty
- @JsonSerialize( contentAs = BaseIdentifiableObject.class )
- @JsonView( { DetailedView.class } )
- @JacksonXmlElementWrapper( localName = "users", namespace = DxfNamespaces.DXF_2_0)
- @JacksonXmlProperty( localName = "user", namespace = DxfNamespaces.DXF_2_0)
+ @JsonSerialize(contentAs = BaseIdentifiableObject.class)
+ @JsonView({ DetailedView.class })
+ @JacksonXmlElementWrapper(localName = "users", namespace = DxfNamespaces.DXF_2_0)
+ @JacksonXmlProperty(localName = "user", namespace = DxfNamespaces.DXF_2_0)
public Set<User> getUsers()
{
return users;
@@ -872,10 +871,10 @@
this.users = users;
}
- @JsonProperty( value = "attributes" )
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlElementWrapper( localName = "attributes", namespace = DxfNamespaces.DXF_2_0)
- @JacksonXmlProperty( localName = "attribute", namespace = DxfNamespaces.DXF_2_0)
+ @JsonProperty(value = "attributes")
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlElementWrapper(localName = "attributes", namespace = DxfNamespaces.DXF_2_0)
+ @JacksonXmlProperty(localName = "attribute", namespace = DxfNamespaces.DXF_2_0)
public Set<AttributeValue> getAttributeValues()
{
return attributeValues;
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties 2012-07-30 10:02:43 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties 2013-02-22 06:30:40 +0000
@@ -312,5 +312,5 @@
check_safe_recommended=Check (safe + recommended)
skip_check_fast=Skip check (fast)
dxf2=DXF2
-dxf2_metadata_import=MetaData Import
-dxf2_metadata_export=MetaData Export
+dxf2_metadata_import=DXF2 MetaData Import
+dxf2_metadata_export=DXF2 MetaData Export
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.vm 2012-07-20 11:58:42 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.vm 2013-02-22 06:30:40 +0000
@@ -2,6 +2,7 @@
<h2>$i18n.getString( "import" ) </h2>
<ul>
+ <li><a href="dxf2MetaDataImport.action">$i18n.getString( "dxf2_metadata_import" ) </a></li>
<li><a href="setImportFormat.action?importFormat=DXF">$i18n.getString( "import" ) </a></li>
<li><a href="displayImportDataValueForm.action?importFormat=xml">$i18n.getString( "xml_data_import" ) </a></li>
<li><a href="displayImportDataValueForm.action?importFormat=csv">$i18n.getString( "csv_data_import" ) </a></li>
@@ -11,10 +12,11 @@
<h2>$i18n.getString( "export" ) </h2>
<ul>
+ <li><a href="dxf2MetaDataExport.action">$i18n.getString( "dxf2_metadata_export" ) </a></li>
<li><a href="displayDataValueExportForm.action">$i18n.getString( "data_export" ) </a></li>
<li><a href="displayMetaDataExportForm.action?exportFormat=DXF">$i18n.getString( "metadata_export" ) </a></li>
<li><a href="displayDetailedMetaDataExportForm.action?exportFormat=DXF">$i18n.getString( "detailed_metadata_export" ) </a></li>
- <li><a href="displayExternalExportMenu.action">$i18n.getString( "export_to_other_systems" ) </a></li>
+ <li><a href="displayExternalExportMenu.action">$i18n.getString( "export_to_other_systems" ) </a></li>
</ul>
<h2>$i18n.getString( "configuration" ) </h2>
@@ -28,12 +30,3 @@
<ul>
<li><a href="displayRoutes.action">$i18n.getString( "integration_configuration" ) </a></li>
</ul>
-
-#*
-<h2>$i18n.getString( "dxf2" ) </h2>
-
-<ul>
- <li><a href="dxf2MetaDataExport.action">$i18n.getString( "dxf2_metadata_export" ) </a></li>
- <li><a href="dxf2MetaDataImport.action">$i18n.getString( "dxf2_metadata_import" ) </a></li>
-</ul>
-*#