Class RequestSet


  • public class RequestSet
    extends Object
    This RequestSet class represents a RequestSet XML document. The RequestSet DTD is defined as the following:

        <?xml version="1.0">
        < !-- This DTD is used by PLL -->
        < !DOCTYPE RequestSet [
        < !ELEMENT RequestSet(Request)+>
        < !ATTLIST RequestSet
           vers  CDATA #REQUIRED
           svcid CDATA #REQUIRED
           reqid CDATA #REQUIRED>
        < !ELEMENT Request(#PCDATA)*>
        < !ATTLIST Request
           dtdid CDATA #IMPLIED
           sid   CDATA #IMPLIED>
        ]>
     

    Each RequestSet object contains a version, service ID, request set ID, and a collection of Request objects. The RequestSet views each Request object as a String. This makes it possible that the content of the Request object can be another XML document. The PLL provides a reference Request DTD. Please see class Request for details on the Request DTD. This class also provides a method to aggregate each Request object and returns a RequestSet XML document based on the RequestSet DTD mentioned above.
    See Also:
    Request
    • Constructor Detail

      • RequestSet

        public RequestSet​(String service)
        This constructor is used primarily at the client side to construct a RequestSet object for a given service. Individual request shall be added to this object by calling addRequest method. service.
        Parameters:
        service - The name of the service.
    • Method Detail

      • parseXML

        public static RequestSet parseXML​(String xml)
        This method is used primarily at the server side to reconstruct a RequestSet object based on the XML document received from client. The DTD of this XML document is described above.
        Parameters:
        xml - The RequestSet XML document String.
      • getRequestSetVersion

        public String getRequestSetVersion()
        Gets the version of the RequestSet.
        Returns:
        The version of the request.
      • getServiceID

        public String getServiceID()
        Gets the service ID of the RequestSet.
        Returns:
        The service ID of the RequestSet.
      • getRequestSetID

        public String getRequestSetID()
        Gets the RequestSet ID for this object.
        Returns:
        The RequestSet ID.
      • getRequests

        public List<Request> getRequests()
        Gets the Request objects contained in this object.
        Returns:
        A Vector of Request objects.
      • addRequest

        public void addRequest​(Request request)
        Adds a Request object to this object.
        Parameters:
        request - A reference to a Request object.
      • toXMLString

        public String toXMLString()
        Returns an XML RequestSet document in String format. The returned String is formatted based on the RequestSet DTD by aggregating each Request object in this object.
        Returns:
        An XML RequestSet document in String format.