Skip to content

Commit

Permalink
EASY-2186: map technical description to EMD description (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
rvanheest authored Jul 3, 2019
1 parent ba35702 commit 71e97bb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package nl.knaw.dans.pf.language.ddm.handlers;

import nl.knaw.dans.pf.language.ddm.handlertypes.BasicStringHandler;
import nl.knaw.dans.pf.language.emd.types.BasicRemark;
import nl.knaw.dans.pf.language.emd.types.BasicString;
import org.xml.sax.SAXException;

Expand All @@ -29,9 +28,8 @@ protected void finishElement(final String uri, final String localName) throws SA
boolean isTechnicalDescription = desciptionType != null && desciptionType.equals("TechnicalInfo");
if (basicString != null) {
if (isTechnicalDescription)
getTarget().getEmdOther().getEasRemarks().add(new BasicRemark("Instructions for Reuse: " + basicString.getValue()));
else
getTarget().getEmdDescription().getDcDescription().add(basicString);
basicString.setValue("Instructions for Reuse: " + basicString.getValue());
getTarget().getEmdDescription().getDcDescription().add(basicString);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ddm:DDM xmlns:ddm='http://easy.dans.knaw.nl/schemas/md/ddm/'
xmlns:dcterms='http://purl.org/dc/terms/'>
<ddm:profile>
<ddm:description ddm:descriptionType='Abstract'>abstract</ddm:description>
<ddm:description descriptionType='Abstract'>abstract</ddm:description>
<ddm:description descriptionType="TechnicalInfo">remark1</ddm:description>
<dcterms:description>beschrijving</dcterms:description>
</ddm:profile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:eas="http://easy.dans.knaw.nl/easy/easymetadata/eas/" emd:version="0.1">
<emd:description>
<dc:description>abstract</dc:description>
<dc:description>Instructions for Reuse: remark1</dc:description>
<dc:description>beschrijving</dc:description>
</emd:description>
<emd:other>
<eas:remark>Instructions for Reuse: remark1</eas:remark>
<eas:application-specific>
<eas:metadataformat>ANY_DISCIPLINE</eas:metadataformat>
<eas:pakbon-status>NOT_IMPORTED</eas:pakbon-status>
Expand Down

0 comments on commit 71e97bb

Please sign in to comment.