public void read(XMLReader reader, ImportParams params) { while (reader.moveToStartElement(ELEMENT_NAME, COLLECTION_NAME)) { final Map<String, String> values = reader.readElements(ELEMENT_NAME); final GroupMemberAssociation association = new GroupMemberAssociation(AssociationType.SET); association.setGroupId( dataDictionaryMapping.get(Integer.parseInt(values.get(FIELD_DATADICTIONARY)))); association.setMemberId(indicatorMapping.get(Integer.parseInt(values.get(FIELD_INDICATOR)))); importObject(association, params); } }
@Override public Boolean getDryRun() { return dryRun = dryRun == null ? (TRUE.equals(reader.getAttributeValue(FIELD_DRYRUN)) ? Boolean.TRUE : null) : dryRun; }
@Override public String getDataElementIdScheme() { return dataElementIdScheme = dataElementIdScheme == null ? reader.getAttributeValue(FIELD_DATAELEMENTIDSCHEME) : dataElementIdScheme; }
@Override public String getStrategy() { return strategy = strategy == null ? reader.getAttributeValue(FIELD_IMPORTSTRATEGY) : strategy; }
@Override public String getOrgUnitIdScheme() { return orgUnitIdScheme = orgUnitIdScheme == null ? reader.getAttributeValue(FIELD_ORGUNITIDSCHEME) : orgUnitIdScheme; }
@Override public boolean hasNextDataValue() { return reader.moveToStartElement(FIELD_DATAVALUE, FIELD_DATAVALUESET); }
@Override public String getOrgUnit() { return orgUnit = orgUnit == null ? reader.getAttributeValue(FIELD_ORGUNIT) : orgUnit; }
@Override public String getPeriod() { return period = period == null ? reader.getAttributeValue(FIELD_PERIOD) : period; }
@Override public String getCompleteDate() { return completeDate = completeDate == null ? reader.getAttributeValue(FIELD_COMPLETEDATE) : completeDate; }
@Override public String getDataSet() { return dataSet = dataSet == null ? reader.getAttributeValue(FIELD_DATASET) : dataSet; }