Index: other-projects/gs3-webservices-java-client/trunk/build.xml
===================================================================
--- other-projects/gs3-webservices-java-client/trunk/build.xml	(revision 26262)
+++ other-projects/gs3-webservices-java-client/trunk/build.xml	(revision 26270)
@@ -182,5 +182,6 @@
   <mkdir dir="${basedir}/tmp" />
   <echo>Getting java files GSXML, XMLConverter, GSPath and MyNodeList from Greenstone's SVN repository (${gs3forclient.svn.path}). Compiling and jarring them up into ${gs3.files.jar}...</echo>
-  <!-- No point using timestamp here with the get Task, since the tmp file is newly created and will not already have these java files. Get will therefore always retrieve them -->
+  <!-- No point using timestamp here with the get Task, since the tmp file is newly created and will not already have these java files. Get will therefore always retrieve them. 
+AbstractBasicDocument.java is included for defining constants for the possible NodeStructureInfo param values. -->
   <get src="${gs3forclient.svn.path}/UserContext.java" dest="${basedir}/tmp/UserContext.java" />
   <get src="${gs3forclient.svn.path}/GSXML.java" dest="${basedir}/tmp/GSXML.java" />
@@ -188,4 +189,5 @@
   <get src="${gs3forclient.svn.path}/GSPath.java" dest="${basedir}/tmp/GSPath.java" />
   <get src="${gs3forclient.svn.path}/MyNodeList.java" dest="${basedir}/tmp/MyNodeList.java" />
+  <get src="${gs3forclient.svn.path}/AbstractBasicDocument.java" dest="${basedir}/tmp/AbstractBasicDocument.java" />
   <!-- compile it up: specifying the file to be compiled explicitly --> 
   <javac srcdir="${basedir}/tmp" destdir="${basedir}/tmp" debug="on" debuglevel="lines,vars,source">
Index: other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraConnection.java
===================================================================
--- other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraConnection.java	(revision 26262)
+++ other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraConnection.java	(revision 26270)
@@ -20,4 +20,5 @@
 
 package org.greenstone.fedora.services;
+import org.greenstone.gsdl3.util.AbstractBasicDocument; // for constants
 import org.greenstone.gsdl3.util.GSXML;
 
@@ -1292,5 +1293,5 @@
      * the structure to retrieve.
      * @param info can contain any combination of: siblingPosition, numSiblings, 
-     * numChildren, requesting additional information about the structure. */
+     * numChildren, documentType, requesting additional information about the structure. */
     public Element getSectionStructureXML(String docPID, String sectionID, String structure, String info)
 		throws RemoteException, UnsupportedEncodingException, SAXException, IOException 
@@ -1748,5 +1749,6 @@
 
 	if(!info.equals("")) {   
-	    if(info.indexOf("numChildren") != -1) {
+	    if(info.indexOf(AbstractBasicDocument.INFO_NUM_CHILDREN) != -1 
+	       || info.indexOf(AbstractBasicDocument.INFO_DOC_TYPE) != -1) {
 		//int numChildren = e.getElementsByTagName(SECTION_ELEMENT).getLength();
 		int numChildren = 0;
@@ -1760,5 +1762,12 @@
 		}
 		
-		root.setAttribute("numChildren", Integer.toString(numChildren));
+		if(info.indexOf(AbstractBasicDocument.INFO_NUM_CHILDREN) != -1) {
+		    root.setAttribute(AbstractBasicDocument.INFO_NUM_CHILDREN, Integer.toString(numChildren));
+		}
+		if(info.indexOf(AbstractBasicDocument.INFO_DOC_TYPE) != -1) {
+		    //String docType = (numChildren > 0) ? "hierarchy" : "simple";
+		    String docType = "hierarchy";
+		    root.setAttribute(AbstractBasicDocument.INFO_DOC_TYPE, docType);
+		}
 	    }
 	    
@@ -1787,10 +1796,10 @@
 		}		
 		
-		if(info.indexOf("numSiblings") != -1) {
-		    root.setAttribute("numSiblings", Integer.toString(numSiblings));
-		}
-		
-		if(info.indexOf("siblingPosition") != -1) {
-		    root.setAttribute("siblingPosition", Integer.toString(siblingPosition));
+		if(info.indexOf(AbstractBasicDocument.INFO_NUM_SIBS) != -1) {
+		    root.setAttribute(AbstractBasicDocument.INFO_NUM_SIBS, Integer.toString(numSiblings));
+		}
+		
+		if(info.indexOf(AbstractBasicDocument.INFO_SIB_POS) != -1) {
+		    root.setAttribute(AbstractBasicDocument.INFO_SIB_POS, Integer.toString(siblingPosition));
 		}
 	    }
Index: other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraGS3Connection.java
===================================================================
--- other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraGS3Connection.java	(revision 26262)
+++ other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraGS3Connection.java	(revision 26270)
@@ -29,4 +29,5 @@
 import org.greenstone.fedora.services.FedoraGS3Exception.FedoraGS3RunException;
 import org.greenstone.fedora.services.FedoraGS3Exception.NotAFedoraServerException;
+import org.greenstone.gsdl3.util.AbstractBasicDocument; // for constants
 import org.greenstone.gsdl3.util.GSXML;
 import org.w3c.dom.Document;
@@ -888,30 +889,39 @@
 		    //    ...
 		    // </nodeStructureInfo>
-		    Element nodeStructureInfo = doc.createElement(GSXML.NODE_STRUCTURE_ELEM+GSXML.INFO_ATT);
+		    Element nodeStructureInfo = doc.createElement(GSXML.NODE_STRUCTURE_ELEM+"Info");
 		    Element root = srcDocElement.getOwnerDocument().getDocumentElement();
 		    
-		    if(root.hasAttribute("numSiblings")) {
-			String numSiblings = root.getAttribute("numSiblings");
+		    if(root.hasAttribute(AbstractBasicDocument.INFO_NUM_SIBS)) {
+			String numSiblings = root.getAttribute(AbstractBasicDocument.INFO_NUM_SIBS);
 			Element infoEl = doc.createElement(GSXML.INFO_ATT);
-			infoEl.setAttribute(GSXML.NAME_ATT, "numSiblings");
+			infoEl.setAttribute(GSXML.NAME_ATT, AbstractBasicDocument.INFO_NUM_SIBS);
 			infoEl.setAttribute(GSXML.VALUE_ATT, numSiblings);
 			nodeStructureInfo.appendChild(infoEl);
 		    }
 		    
-		    if(root.hasAttribute("siblingPosition")) {
-			String siblingPosition = root.getAttribute("siblingPosition");
+		    if(root.hasAttribute(AbstractBasicDocument.INFO_SIB_POS)) {
+			String siblingPosition = root.getAttribute(AbstractBasicDocument.INFO_SIB_POS);
 			Element infoEl = doc.createElement(GSXML.INFO_ATT);
-			infoEl.setAttribute(GSXML.NAME_ATT, "siblingPosition");
+			infoEl.setAttribute(GSXML.NAME_ATT, AbstractBasicDocument.INFO_SIB_POS);
 			infoEl.setAttribute(GSXML.VALUE_ATT, siblingPosition);
 			nodeStructureInfo.appendChild(infoEl);
 		    }
 		    
-		    if(root.hasAttribute("numChildren")) {
-			String numChildren = root.getAttribute("numChildren");
+		    if(root.hasAttribute(AbstractBasicDocument.INFO_NUM_CHILDREN)) {
+			String numChildren = root.getAttribute(AbstractBasicDocument.INFO_NUM_CHILDREN);
 			Element infoEl = doc.createElement(GSXML.INFO_ATT);		
-			infoEl.setAttribute(GSXML.NAME_ATT, "numChildren");
+			infoEl.setAttribute(GSXML.NAME_ATT, AbstractBasicDocument.INFO_NUM_CHILDREN);
 			infoEl.setAttribute(GSXML.VALUE_ATT, numChildren);
 			nodeStructureInfo.appendChild(infoEl);
 		    }
+
+		    if(root.hasAttribute(AbstractBasicDocument.INFO_DOC_TYPE)) {
+			String documentType = root.getAttribute(AbstractBasicDocument.INFO_DOC_TYPE);
+			Element infoEl = doc.createElement(GSXML.INFO_ATT);		
+			infoEl.setAttribute(GSXML.NAME_ATT, AbstractBasicDocument.INFO_DOC_TYPE);
+			infoEl.setAttribute(GSXML.VALUE_ATT, documentType);
+			nodeStructureInfo.appendChild(infoEl);
+		    }	    
+
 		    docNode.appendChild(nodeStructureInfo);
 		}
@@ -2478,7 +2488,7 @@
 			for(int i = 0; i < docIDs.length; i++) {
 				System.out.println("Descendents and numChildren:\n"
-						   + con.getDocumentStructure(docIDs[i], new String[] {"descendants"}, new String[] {"numChildren"}));
+						   + con.getDocumentStructure(docIDs[i], new String[] {"descendants"}, new String[] {AbstractBasicDocument.INFO_NUM_CHILDREN}));
 				System.out.println("Parent and numSiblings:\n"
-						   + con.getDocumentStructure(docIDs[i], new String[] {"parent"}, new String[] {"numSiblings"}));
+						   + con.getDocumentStructure(docIDs[i], new String[] {"parent"}, new String[] {AbstractBasicDocument.INFO_NUM_SIBS}));
 			}
 			
@@ -2490,5 +2500,5 @@
 			System.out.println(con.getContent(errorCases));
 			System.out.println(con.getDocumentMetadata(errorCases, new String[]{"all"}));
-						   System.out.println(con.getDocumentStructure(errorCases, new String[] {"descendants"}, new String[] {"numChildren"}));
+						   System.out.println(con.getDocumentStructure(errorCases, new String[] {"descendants"}, new String[] {AbstractBasicDocument.INFO_NUM_CHILDREN}));
 			
 			System.out.println("\nCLASSIFIER BROWSE");
