}
List fields = marcRecord.getDataFields();
if (fields != null) {
for (Iterator i = fields.iterator(); i.hasNext();) {
DataField datafield = (DataField) i.next();
List subfields = datafield.getSubfields();
//if tag==016 we need to concatenate informations from subfield $a
//and subfield $2
if(datafield.getTag().compareTo("016")==0){
String contentCodeA=null;
String contentCodeTwo=null;
for (Iterator j = subfields.iterator(); j.hasNext();) {
Subfield subfield = (Subfield) j.next();
if(subfield.getCode()=='2' && subfield.getData()!=null ){
contentCodeTwo=subfield.getData();
}
if(subfield.getCode()=='a' && subfield.getData()!=null ){
contentCodeA=subfield.getData();
}
}
addProperty(ret, mappings.get(datafield.getTag())+"("+contentCodeTwo+")", contentCodeA);
}
//if tag==100 we need to check informations from subfield $4 and $0
//and subfield $2
if(datafield.getTag().compareTo("100")==0){
String contentCodeFour=null;
String contentCodeZero=null;
for (Iterator j = subfields.iterator(); j.hasNext();) {
Subfield subfield = (Subfield) j.next();
if(subfield.getCode()=='4' && subfield.getData()!=null ){
contentCodeFour=subfield.getData();
}
if(subfield.getCode()=='0' && subfield.getData()!=null && contentCodeFour.compareTo("aut")==0){
contentCodeZero=subfield.getData();
}
}
addProperty(ret, mappings.get(datafield.getTag()), contentCodeZero);
}
//one to one mappings
else{
for (Iterator j = subfields.iterator(); j.hasNext();) {
Subfield subfield = (Subfield) j.next();
String tagAndSubfield = datafield.getTag() + " $"
+ subfield.getCode();
String mappingTagName = mappings.get(tagAndSubfield);
if (mappingTagName != null) {
addProperty(ret, mappingTagName, subfield.getData());
}