Changeset 25313 for main/trunk
- Timestamp:
- 2012-03-28T17:01:41+13:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSXML.java
r25300 r25313 92 92 public static final String DISPLAY_ELEM = "display"; 93 93 public static final String LEVEL_ELEM = "level"; 94 94 public static final String REPLACE_ELEM = "replace"; 95 95 96 96 public static final String DBINFO_ELEM = "dbInfo"; … … 123 123 // add on to another elem type to get a list of that type 124 124 public static final String LIST_MODIFIER = "List"; 125 126 125 // used to refer back to another element type 126 public static final String REF_MODIFIER = "Ref"; 127 127 // greenstone xml attributes 128 128 public static final String COLLECTION_ATT = "collection"; … … 158 158 public static final String NODE_STRUCTURE_ELEM = "nodeStructure"; 159 159 public static final String NODE_ID_ATT = "nodeID"; 160 161 160 public static final String HREF_ID_ATT = "hrefId"; // for ids that need translating 161 public static final String ID_MOD_ATT = "idMod"; // might hold .rt etc for hrefIds 162 162 public static final String NODE_OID = "oid"; 163 163 public static final String NODE_NAME_ATT = "nodeName"; … … 1111 1111 private static void xmlNodeToString(StringBuffer sb, Node e, int depth, boolean printText) 1112 1112 { 1113 if (e == null)1113 if (e == null) 1114 1114 { 1115 1115 return; 1116 1116 } 1117 1117 1118 1118 for (int i = 0; i < depth; i++) 1119 1119 sb.append(' '); … … 1253 1253 { 1254 1254 ArrayList<String> groups = new ArrayList<String>(); 1255 1255 1256 1256 Element groupList = (Element) GSXML.getChildByTagName(securityResponse, GSXML.GROUP_ELEM + GSXML.LIST_MODIFIER); 1257 if (groupList == null)1257 if (groupList == null) 1258 1258 { 1259 1259 return groups; 1260 1260 } 1261 1261 1262 1262 NodeList groupElems = GSXML.getChildrenByTagName(groupList, GSXML.GROUP_ELEM); 1263 1264 for (int i = 0; i < groupElems.getLength(); i++)1263 1264 for (int i = 0; i < groupElems.getLength(); i++) 1265 1265 { 1266 1266 Element groupElem = (Element) groupElems.item(i); 1267 1267 groups.add(groupElem.getAttribute(GSXML.NAME_ATT)); 1268 1268 } 1269 1269 1270 1270 return groups; 1271 1271 }
Note:
See TracChangeset
for help on using the changeset viewer.