1 package org.exoplatform.services.xml.querying;2 3 import java.util.Collection ;4 import java.io.InputStream ;5 import org.exoplatform.services.xml.querying.object.ObjectMarshalException;6 import org.w3c.dom.NodeList ;7 8 9 public interface XMLFragmentData extends XMLData {10 /**11 * Returns mapping for the own dom-tree 12 * with SyntheticalRoot as root and13 * returns nested objects As Abstract collection 14 */15 Collection getAsCollection(Object mappingSource) throws ObjectMarshalException;16 17 /**18 * Returns nested objects As Collection19 * after marshalling with implicit (Class reflection based) mapping 20 */21 Collection getAsCollection(Class forClass) throws ObjectMarshalException;22 23 /**24 * Initializes this with the DOM NodeList 25 * DOES NOT WORK properly!26 */27 // void init(NodeList list) throws UniFormTransformationException;28 29 /**30 * Initializes this with the io.InputStream 31 */32 void init(InputStream stream) throws UniFormTransformationException;33 34 byte[] getAsByteArray();35 36 NodeList getAsNodeList();37 38 /**39 * Is this object empty?40 * **/41 boolean isEmpty();42 }43