Changeset 21775 for other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraConnection.java
- Timestamp:
- 2010-03-11T16:45:58+13:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraConnection.java
r15659 r21775 766 766 767 767 /** All "greenstone:*" objects in fedora (be they collections or documents) 768 * have a TOC datastream. This method returns the content (XML) of the TOC 769 * datastream as is. (Calls default fedora-system 3 dissemination <pid>/TOC.) 768 * have a TOC datastream, unless they have only 1 section (SECTION1). 769 * This method returns the content (XML) of the TOC datastream as is. 770 * (Calls default fedora-system 3 dissemination <pid>/TOC.) 770 771 * @return a String version of the XML in the TOC datastream for the fedora 771 772 * object denoted by pid. … … 780 781 throws RemoteException, UnsupportedEncodingException 781 782 { 783 try { 782 784 MIMETypedStream tocStream = APIA.getDatastreamDissemination(pid, TOC, null); 783 785 //asOfDateTime = null to get the current version of the dataStream 784 785 786 // need to set the charset encoding to UTF8 786 787 return new String(tocStream.getStream(), UTF8); 788 } catch(RemoteException re) { 789 // if TOC does not exist, then it means there is only 1 section, dsID: SECTION1 790 return new String("<Section id=\"1\"></Section>".getBytes(), UTF8); //set charset 791 } 787 792 } 788 793 … … 1317 1322 // If sectionNumber=1, then the top-level element/document element 1318 1323 // of the TOC XML is requested, so return the TOC as is. 1319 if(sectionNumber.equals("1")) 1324 if(sectionNumber.equals("1")) { 1320 1325 return docEl; 1326 } 1321 1327 1322 1328 // Get all <Section> elements and find the
Note:
See TracChangeset
for help on using the changeset viewer.