com.limegroup.gnutella.xml
Class LimeXMLDocumentHelper

java.lang.Object
  extended bycom.limegroup.gnutella.xml.LimeXMLDocumentHelper

public final class LimeXMLDocumentHelper
extends java.lang.Object


Method Summary
static java.util.List breakSingleSchemaAggregateString(java.lang.String aggregrateXMLStr)
          Breaks the passed xml document in aggregate form (where the root element has multiple child nodes) to a list of xml documents where the root node has got only one child.
static void debug(java.lang.String out)
           
static java.lang.String getAggregateString(Response[] responses)
           
static java.util.List getDocuments(java.lang.String aggregrateXMLStr, int totalResponseCount)
          TO be used when a Query Reply comes with a chunk of meta-data we want to get LimeXMLDocuments out of it
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDocuments

public static java.util.List getDocuments(java.lang.String aggregrateXMLStr,
                                          int totalResponseCount)
TO be used when a Query Reply comes with a chunk of meta-data we want to get LimeXMLDocuments out of it

returns null if the XML string does now parse.


breakSingleSchemaAggregateString

public static java.util.List breakSingleSchemaAggregateString(java.lang.String aggregrateXMLStr)
Breaks the passed xml document in aggregate form (where the root element has multiple child nodes) to a list of xml documents where the root node has got only one child. In other words it breaks the multiple documents embedded in a single big document to respective non-embedded documents

Returns:
List (of LimeXMLDocument) of LimeXMlDocuments that we get after breaking the aggregate string. Returns null, if the aggregateXMLString is not a valid xml

getAggregateString

public static java.lang.String getAggregateString(Response[] responses)
Parameters:
responses - array is a set of responses. Sore have meta-data some do not. The aggregrate string should reflect the indexes of the responses

If none of the responses have any metadata, this method returns an empty string.


debug

public static void debug(java.lang.String out)