Class ResolverDAO

java.lang.Object
org.fedoraproject.xmvn.tools.resolve.xml.ResolverDAO

public class ResolverDAO extends Object
Data Access Object for reading Lists of ResolutionRequests from InputStreams and writing ResolutionResults to OutputStreams.
Author:
Mikolaj Izdebski
  • Constructor Details

    • ResolverDAO

      public ResolverDAO()
  • Method Details

    • unmarshalRequests

      public static List<org.fedoraproject.xmvn.resolver.ResolutionRequest> unmarshalRequests(InputStream is) throws IOException, io.kojan.xml.XMLException
      Deserializes List of ResolutionRequests, reading XML data from given InputStream.
      Parameters:
      is - the source to read XML data from
      Returns:
      deserialized list of resolution requests
      Throws:
      IOException - in case I/O exception occurs when reading form the stream
      io.kojan.xml.XMLException - in case exception occurs during XML deserialization
    • marshalResults

      public static void marshalResults(OutputStream os, List<org.fedoraproject.xmvn.resolver.ResolutionResult> results) throws IOException, io.kojan.xml.XMLException
      Serializes entity into XML format, writing XML data to given Writer.
      Parameters:
      os - the sink to write XML data to
      results - list of resolution requests to serialize
      Throws:
      IOException - in case I/O exception occurs when writing to the stream
      io.kojan.xml.XMLException - in case exception occurs during XML serialization