Class SavedQueryBinding


  • public final class SavedQueryBinding
    extends java.lang.Object
    Convert SavedQuerys to and from XML
    Author:
    Thomas Riley
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String marshal​(SavedQuery query, int version)
      Convert a TemplateQuery to XML
      static void marshal​(SavedQuery query, javax.xml.stream.XMLStreamWriter writer, int version)
      Convert a SavedQuery to XML and write XML to given writer.
      static java.util.Map<java.lang.String,​SavedQuery> unmarshal​(java.io.Reader reader, java.util.Map savedBags, int version)
      Parse TemplateQuerys from XML
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • marshal

        public static void marshal​(SavedQuery query,
                                   javax.xml.stream.XMLStreamWriter writer,
                                   int version)
        Convert a SavedQuery to XML and write XML to given writer.
        Parameters:
        query - the SavedQuery
        writer - the XMLStreamWriter to write to
        version - the version number of the XML format, an attribute of the ProfileManager
      • marshal

        public static java.lang.String marshal​(SavedQuery query,
                                               int version)
        Convert a TemplateQuery to XML
        Parameters:
        query - the SavedQuery
        version - the version number of the XML format, an attribute of the ProfileManager
        Returns:
        the corresponding XML String
      • unmarshal

        public static java.util.Map<java.lang.String,​SavedQuery> unmarshal​(java.io.Reader reader,
                                                                                 java.util.Map savedBags,
                                                                                 int version)
        Parse TemplateQuerys from XML
        Parameters:
        reader - the saved queries
        savedBags - Map from bag name to bag
        version - the version of the XML, an attribute on the profile manager
        Returns:
        a Map from query name to SavedQuery