.getChildren("DirectoryEntry", esuNs);
l4j.debug("Found " + children.size() + " objects");
for (Iterator i = children.iterator(); i.hasNext();) {
Object o = i.next();
if (o instanceof Element) {
DirectoryEntry de = new DirectoryEntry();
de.setId(new ObjectId(((Element) o).getChildText(
"ObjectID", esuNs)));
String name = ((Element) o).getChildText("Filename", esuNs);
String type = ((Element) o).getChildText("FileType", esuNs);
name = basePath.toString() + name;
if ("directory".equals(type)) {
name += "/";
}
de.setPath(new ObjectPath(name));
de.setType(type);
// next, get metadata
Element sMeta = ((Element) o).getChild( "SystemMetadataList", esuNs );
Element uMeta = ((Element) o).getChild( "UserMetadataList", esuNs );
if( sMeta != null ) {
de.setSystemMetadata( new MetadataList() );
for( Iterator m = sMeta.getChildren( "Metadata" , esuNs ).iterator(); m.hasNext(); ) {
Element metaElement = (Element)m.next();
String mName = metaElement.getChildText( "Name", esuNs );
String mValue = metaElement.getChildText( "Value", esuNs );
de.getSystemMetadata().addMetadata( new Metadata( mName, mValue, false ) );
}
}
if( uMeta != null ) {
de.setUserMetadata( new MetadataList() );
for( Iterator m = uMeta.getChildren( "Metadata" , esuNs ).iterator(); m.hasNext(); ) {
Element metaElement = (Element)m.next();
String mName = metaElement.getChildText( "Name", esuNs );
String mValue = metaElement.getChildText( "Value", esuNs );
String mListable = metaElement.getChildText( "Listable", esuNs );
de.getUserMetadata().addMetadata( new Metadata( mName, mValue, "true".equals( mListable ) ) );
}
}
objs.add(de);
} else {