Index: /greenstone3/trunk/src/java/org/greenstone/gsdl3/util/OID.java
===================================================================
--- /greenstone3/trunk/src/java/org/greenstone/gsdl3/util/OID.java	(revision 18502)
+++ /greenstone3/trunk/src/java/org/greenstone/gsdl3/util/OID.java	(revision 18503)
@@ -26,79 +26,79 @@
     
     /** returns everything up to the first dot 
-	if no dot, returns oid */
+      if no dot, returns oid */
     public static String getTop(String oid) {
-	int pos = oid.indexOf('.');
-	if (pos == -1) {
-	    return oid;
-	}
-	return oid.substring(0, pos);
-	
+      int pos = oid.indexOf('.');
+      if (pos == -1) {
+          return oid;
+      }
+      return oid.substring(0, pos);
+      
     }
     /** returns true is oid is top level (ie has no dots) 
      returns false for an empty oid */
     public static boolean isTop(String oid) {
-	if (oid.equals("")) {
-	    return false;
-	}
-	return (oid.indexOf('.')==-1);
+      if (oid.equals("")) {
+          return false;
+      }
+      return (oid.indexOf('.')==-1);
     }
-	
+      
     /** returns the parent of oid (everything up to last dot) 
      returns oid if oid has no parent */
     public static String getParent(String oid) {
-	int pos = oid.lastIndexOf('.');
-	if (pos == -1) {
-	    return oid;
-	}
-	return oid.substring(0, pos);
+      int pos = oid.lastIndexOf('.');
+      if (pos == -1) {
+          return oid;
+      }
+      return oid.substring(0, pos);
     }
 
     /** returns the full name - replaces all " with parent */
     public static String translateParent(String oid, String parent) {
-	return oid.replaceAll("\"", parent); 
+      return oid.replaceAll("\"", parent); 
     }
     /** does the opposite to translate_parent */
     public static String shrinkParent(String oid) {
-	int pos = oid.lastIndexOf('.');
-	if (pos==-1) return oid;
-	return "\""+oid.substring(pos);
+      int pos = oid.lastIndexOf('.');
+      if (pos==-1) return oid;
+      return "\""+oid.substring(pos);
     }
     /** returns true if oid uses .fc, .lc, .pr, .ns, .ps .rt (root) .ss (specified sibling)*/
     public static boolean needsTranslating(String oid) {
-	if (oid.length()<4) return false;
-	String tail = oid.substring(oid.length()-3);
-	return (tail.equals(".fc") || tail.equals(".lc") || 
-		tail.equals(".pr") || tail.equals(".ns") || 
-		tail.equals(".ps") || tail.equals(".rt") || 
-		tail.equals(".ss") || tail.equals(".np") ||
-		tail.equals(".pp"));
+      if (oid.length()<4) return false;
+      String tail = oid.substring(oid.length()-3);
+      return (tail.equals(".fc") || tail.equals(".lc") || 
+            tail.equals(".pr") || tail.equals(".ns") || 
+            tail.equals(".ps") || tail.equals(".rt") || 
+            tail.equals(".ss") || tail.equals(".np") ||
+            tail.equals(".pp"));
     }
     /** strips suffix from end */
     public static String stripSuffix(String oid) {
-	String tail = oid.substring(oid.length()-3);
-	while (tail.equals(".fc") || tail.equals(".lc") || 
-	       tail.equals(".pr") || tail.equals(".ns") || 
-	       tail.equals(".ps") || tail.equals(".ss") || 
-	       tail.equals(".np") || tail.equals(".pp") ||
-	       tail.equals(".rt") ) {
-	    if (tail.equals(".ss")) { // have doc.sibnum.ss
-		oid = oid.substring(0, oid.length()-3);
-		int pos = oid.lastIndexOf('.');
-		//strip that too
-		oid = oid.substring(0, pos);
-	    } 
-	    oid = oid.substring(0, oid.length()-3);
-	    tail = oid.substring(oid.length()-3);
-	}
-	
-	return oid;
+      String tail = oid.substring(oid.length()-3);
+      while (tail.equals(".fc") || tail.equals(".lc") || 
+             tail.equals(".pr") || tail.equals(".ns") || 
+             tail.equals(".ps") || tail.equals(".ss") || 
+             tail.equals(".np") || tail.equals(".pp") ||
+             tail.equals(".rt") ) {
+          if (tail.equals(".ss")) { // have doc.sibnum.ss
+            oid = oid.substring(0, oid.length()-3);
+            int pos = oid.lastIndexOf('.');
+            //strip that too
+            oid = oid.substring(0, pos);
+          } 
+          oid = oid.substring(0, oid.length()-3);
+          tail = oid.substring(oid.length()-3);
+      }
+      
+      return oid;
     }
     /** returns true if child is a child of parent 
      an oid is not a child of itself */
     public static boolean isChildOf(String parent, String child) {
-	if (parent.equals(child)) {
-	    return false;
-	}
-	return child.startsWith(parent);
+      if (parent.equals(child)) {
+          return false;
+      }
+      return child.startsWith(parent);
     }
 }
Index: /greenstone3/trunk/src/java/org/greenstone/gsdl3/util/OIDTest.java
===================================================================
--- /greenstone3/trunk/src/java/org/greenstone/gsdl3/util/OIDTest.java	(revision 18502)
+++ /greenstone3/trunk/src/java/org/greenstone/gsdl3/util/OIDTest.java	(revision 18503)
@@ -37,75 +37,71 @@
 
     public OIDTest(String name) {
-	super(name);
+      super(name);
     }
 
     /** test suite that dynamically runs all the tests */
     public static Test suite() {
-	return new TestSuite(OIDTest.class);
+      return new TestSuite(OIDTest.class);
     }
 
     public void testGetTop() {
-	
-	assertEquals(oid1, OID.getTop(oid1));
-	assertEquals(oid1, OID.getTop(oid2));
-	assertEquals(empty, OID.getTop(empty));
+      assertEquals(oid1, OID.getTop(oid1));
+      assertEquals(oid1, OID.getTop(oid2));
+      assertEquals(empty, OID.getTop(empty));
     }
   
     public void testIsTop() {
-	assertTrue(!OID.isTop(empty));
-	assertTrue(OID.isTop(oid1));
-	assertTrue(!OID.isTop(oid2));
+      assertTrue(!OID.isTop(empty));
+      assertTrue(OID.isTop(oid1));
+      assertTrue(!OID.isTop(oid2));
     }
 
     public void testGetParent() {
-
-	assertEquals(empty, OID.getParent(oid1));
-	assertEquals(oid1, OID.getParent(oid2));
-	assertEquals(empty, OID.getParent(empty));
-	
+      assertEquals(empty, OID.getParent(oid1));
+      assertEquals(oid1, OID.getParent(oid2));
+      assertEquals(empty, OID.getParent(empty));
     }
 
     public void testTranslateParent() {
-	String short_id = "\".1";
-	assertEquals(oid2, OID.translateParent(short_id, oid1));
-	// should return the original oid if its not a shortened form
-	assertEquals(oid2, OID.translateParent(oid2, oid1));
-	
+      String short_id = "\".1";
+      assertEquals(oid2, OID.translateParent(short_id, oid1));
+      // should return the original oid if its not a shortened form
+      assertEquals(oid2, OID.translateParent(oid2, oid1));
     }
 
     public void testShrinkParent() {
-	String short_oid2 = "\".1";
-	String short_oid3 = "\".2";
+      String short_oid2 = "\".1";
+      String short_oid3 = "\".2";
 
-	assertEquals(oid1, OID.shrinkParent(oid1));
-	assertEquals(short_oid2, OID.shrinkParent(oid2));
-	assertEquals(short_oid3, OID.shrinkParent(oid3));
+      assertEquals(oid1, OID.shrinkParent(oid1));
+      assertEquals(short_oid2, OID.shrinkParent(oid2));
+      assertEquals(short_oid3, OID.shrinkParent(oid3));
     }
 
     public void testNeedsTranslating() {
-	assertTrue(!OID.needsTranslating(oid1));
-	assertTrue(!OID.needsTranslating(oid2));
-	assertTrue(OID.needsTranslating(oidfc));
-	assertTrue(OID.needsTranslating(oidlc));
-	assertTrue(OID.needsTranslating(oidpr));
-	assertTrue(OID.needsTranslating(oidns));
-	assertTrue(OID.needsTranslating(oidps));
+      assertTrue(!OID.needsTranslating(oid1));
+      assertTrue(!OID.needsTranslating(oid2));
+      assertTrue(OID.needsTranslating(oidfc));
+      assertTrue(OID.needsTranslating(oidlc));
+      assertTrue(OID.needsTranslating(oidpr));
+      assertTrue(OID.needsTranslating(oidns));
+      assertTrue(OID.needsTranslating(oidps));
 
     }
 
     public void testStripSuffix() {
-	assertEquals(oid1, OID.stripSuffix(oidfc));
-	assertEquals(oid1, OID.stripSuffix(oidlc));
-	assertEquals(oid1, OID.stripSuffix(oidpr));
-	assertEquals(oid1, OID.stripSuffix(oidns));
-	assertEquals(oid1, OID.stripSuffix(oidps));
+      assertEquals(oid1, OID.stripSuffix(oidfc));
+      assertEquals(oid1, OID.stripSuffix(oidlc));
+      assertEquals(oid1, OID.stripSuffix(oidpr));
+      assertEquals(oid1, OID.stripSuffix(oidns));
+      assertEquals(oid1, OID.stripSuffix(oidps));
     }
 
     public void testIsChildOf() {
-	assertTrue(OID.isChildOf(oid1, oid2));
-	assertTrue(OID.isChildOf(oid1, oid3));
-	assertTrue(OID.isChildOf(oid2, oid3));
-	assertTrue(!OID.isChildOf(oid3, oid1));
-	assertTrue(!OID.isChildOf(oid1, oid1));
+      assertTrue(OID.isChildOf(oid1, oid2));
+      assertTrue(OID.isChildOf(oid1, oid3));
+      assertTrue(OID.isChildOf(oid2, oid3));
+      assertTrue(!OID.isChildOf(oid3, oid1));
+      assertTrue(!OID.isChildOf(oid1, oid1));
     }
 
