=== removed directory 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/datavalueset' === removed file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/datavalueset/DataValue.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/datavalueset/DataValue.java 2011-02-17 08:25:53 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/datavalueset/DataValue.java 1970-01-01 00:00:00 +0000 @@ -1,129 +0,0 @@ -package org.hisp.dhis.importexport.datavalueset; - -/* - * Copyright (c) 2011, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; - -@XmlAccessorType( XmlAccessType.FIELD ) -public class DataValue -{ - - @XmlAttribute( name = "dataSet" ) - private String dataSetUuid; - - @XmlAttribute( name = "orgUnit", required = true ) - private String organisationUnitUuid; - - @XmlAttribute( name = "period", required = true ) - private String periodIsoDate; - - @XmlAttribute( name = "dataElement", required = true ) - private String dataElementUuid; - - @XmlAttribute( name = "categoryOptionCombo" ) - private String categoryOptionComboUuid; - - @XmlAttribute - private String storedBy; - - @XmlAttribute - private String value; - - public String getDataSetUuid() - { - return dataSetUuid; - } - - public void setDataSetUuid( String dataSetUuid ) - { - this.dataSetUuid = dataSetUuid; - } - - public String getOrganisationUnitUuid() - { - return organisationUnitUuid; - } - - public void setOrganisationUnitUuid( String organisationUnitUuid ) - { - this.organisationUnitUuid = organisationUnitUuid; - } - - public String getPeriodIsoDate() - { - return periodIsoDate; - } - - public void setPeriodIsoDate( String periodIsoDate ) - { - this.periodIsoDate = periodIsoDate; - } - - public String getDataElementUuid() - { - return dataElementUuid; - } - - public void setDataElementUuid( String dataElementUuid ) - { - this.dataElementUuid = dataElementUuid; - } - - public String getCategoryOptionComboUuid() - { - return categoryOptionComboUuid; - } - - public void setCategoryOptionComboUuid( String categoryOptionComboUuid ) - { - this.categoryOptionComboUuid = categoryOptionComboUuid; - } - - public String getValue() - { - return value; - } - - public void setValue( String value ) - { - this.value = value; - } - - public String getStoredBy() - { - return storedBy; - } - - public void setStoredBy( String storedBy ) - { - this.storedBy = storedBy; - } - -} \ No newline at end of file === removed file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/datavalueset/DataValueSet.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/datavalueset/DataValueSet.java 2011-02-17 08:25:53 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/datavalueset/DataValueSet.java 1970-01-01 00:00:00 +0000 @@ -1,91 +0,0 @@ -package org.hisp.dhis.importexport.datavalueset; - -/* - * Copyright (c) 2011, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; - -@XmlAccessorType( XmlAccessType.FIELD ) -public class DataValueSet -{ - - @XmlAttribute( name = "dataSet" ) - private String dataSetUuid; - - @XmlAttribute( name = "orgUnit", required = true ) - private String organisationUnitUuid; - - @XmlAttribute( name = "period", required = true ) - private String periodIsoDate; - - @XmlAttribute( name = "complete" ) - private String completeDate; - - public String getDataSetUuid() - { - return dataSetUuid; - } - - public void setDataSetUuid( String dataSetUuid ) - { - this.dataSetUuid = dataSetUuid; - } - - public String getOrganisationUnitUuid() - { - return organisationUnitUuid; - } - - public void setOrganisationUnitUuid( String organisationUnitUuid ) - { - this.organisationUnitUuid = organisationUnitUuid; - } - - public String getPeriodIsoDate() - { - return periodIsoDate; - } - - public void setPeriodIsoDate( String periodIsoDate ) - { - this.periodIsoDate = periodIsoDate; - } - - public String getCompleteDate() - { - return completeDate; - } - - public void setCompleteDate( String completeDate ) - { - this.completeDate = completeDate; - } - - -} === removed file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/datavalueset/DataValueSetService.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/datavalueset/DataValueSetService.java 2011-02-17 08:25:53 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/datavalueset/DataValueSetService.java 1970-01-01 00:00:00 +0000 @@ -1,401 +0,0 @@ -package org.hisp.dhis.importexport.datavalueset; - -/* - * Copyright (c) 2011, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; -import java.util.Set; - -import org.hisp.dhis.dataelement.DataElement; -import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo; -import org.hisp.dhis.dataelement.DataElementCategoryService; -import org.hisp.dhis.dataelement.DataElementService; -import org.hisp.dhis.dataset.CompleteDataSetRegistration; -import org.hisp.dhis.dataset.CompleteDataSetRegistrationService; -import org.hisp.dhis.dataset.DataSet; -import org.hisp.dhis.dataset.DataSetService; -import org.hisp.dhis.datavalue.DataValue; -import org.hisp.dhis.datavalue.DataValueService; -import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.organisationunit.OrganisationUnitService; -import org.hisp.dhis.period.DailyPeriodType; -import org.hisp.dhis.period.Period; -import org.hisp.dhis.period.PeriodType; -import org.springframework.beans.factory.annotation.Required; -import org.springframework.transaction.annotation.Transactional; - -public class DataValueSetService -{ - - private OrganisationUnitService organisationUnitService; - - private DataSetService dataSetService; - - private DataElementCategoryService categoryService; - - private DataElementService dataElementService; - - private DataValueService dataValueService; - - private CompleteDataSetRegistrationService registrationService; - - /** - * Save a dataValueSet if all of the following is valid - *

- * First checks that: - *

- * For all dataValues it checks that: - * - * What isn't checked yet: - * - * Concerns: - *