Skip to content

Commit

Permalink
issue #163: PICA: general changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pkiraly committed Sep 5, 2022
1 parent a110977 commit 086ea6b
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -670,10 +670,16 @@ public List<String> select(PicaPath selector) {
throw new IllegalArgumentException("The record is not a PICA record");

List<String> results = new ArrayList<>();
for (DataField dataField : getDatafield(selector.getTag())) {
for (String code : selector.getSubfields().getCodes()) {
for (MarcSubfield subfield : dataField.getSubfield(code)) {
results.add(subfield.getValue());
List<DataField> dataFields = getDatafield(selector.getTag());
if (dataFields != null) {
for (DataField dataField : dataFields) {
for (String code : selector.getSubfields().getCodes()) {
List<MarcSubfield> dubfields = dataField.getSubfield(code);
if (dubfields != null) {
for (MarcSubfield subfield : dubfields) {
results.add(subfield.getValue());
}
}
}
}
}
Expand Down

0 comments on commit 086ea6b

Please sign in to comment.