Changeset 26274 for main/trunk/greenstone3/src
- Timestamp:
- 2012-10-01T19:06:42+13:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/FedoraServiceProxy.java
r26273 r26274 593 593 } 594 594 595 // get the requested nodeIDs out of a request message 595 596 protected String[] parse(Element request, String nodeType, String attribute) { 596 597 String[] nodevalues = null; 598 int count = 0; 597 599 598 600 Element docList = (Element) GSXML.getChildByTagName(request, nodeType+GSXML.LIST_MODIFIER); … … 603 605 for(int i = 0; i < nodevalues.length; i++) { 604 606 Element e = (Element)docNodes.item(i); 605 nodevalues[i] = e.getAttribute(attribute); 606 } 607 } 608 } 607 String id = e.getAttribute(attribute); 608 // Not sure why there are at times requests for hashXXX.dir, which is not a fedora PID 609 // To skip these: if not requesting an externalURL and if requesting a docNode, 610 // then the ID has to contain the : character special to fedora PIDs 611 if(attribute == "externalURL" || (nodeType != GSXML.DOC_NODE_ELEM || id.contains(":"))) { 612 nodevalues[count++] = id; 613 } 614 } 615 } 616 } 617 618 if(count == 0) { 619 return null; 620 } 621 622 String[] tmp = new String[count]; 623 for(int i = 0; i < count; i++) { 624 tmp[i] = nodevalues[i]; 625 } 626 nodevalues = null; 627 nodevalues = tmp; 628 609 629 return nodevalues; 610 630 }
Note:
See TracChangeset
for help on using the changeset viewer.