Class SharedBagBinding


  • public class SharedBagBinding
    extends java.lang.Object
    Parse the shared bags in XML format
    Author:
    dbutano
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String marshal​(Profile profile)
      Convert the shared bags to XML
      static void marshal​(Profile profile, javax.xml.stream.XMLStreamWriter writer)
      Convert the bags shared to the profile given in input and write XML to given writer.
      static java.util.List<java.util.Map<java.lang.String,​java.lang.String>> unmarshal​(java.io.Reader reader, java.lang.Integer userId)
      Parse saved queries from a Reader.
      • Methods inherited from class java.lang.Object

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

      • SharedBagBinding

        public SharedBagBinding()
    • Method Detail

      • marshal

        public java.lang.String marshal​(Profile profile)
        Convert the shared bags to XML
        Parameters:
        profile - user's profile
        Returns:
        the corresponding XML String
      • marshal

        public static void marshal​(Profile profile,
                                   javax.xml.stream.XMLStreamWriter writer)
        Convert the bags shared to the profile given in input and write XML to given writer.
        Parameters:
        profile - the profile which has been shared some bags
        writer - the XMLStreamWriter to write to
      • unmarshal

        public static java.util.List<java.util.Map<java.lang.String,​java.lang.String>> unmarshal​(java.io.Reader reader,
                                                                                                       java.lang.Integer userId)
        Parse saved queries from a Reader.
        Parameters:
        reader - the saved bags
        userId - an Integer
        Returns:
        list of queries