Class InterMineBagHandler

  • All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

    public class InterMineBagHandler
    extends org.xml.sax.helpers.DefaultHandler
    A handler for turning XML bags data into an InterMineIdBag.
    Author:
    Mark Woodbridge, Kim Rutherford, Alex Kalderimis
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void endElement​(java.lang.String uri, java.lang.String localName, java.lang.String qName)
      void startElement​(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attrs)
      InvalidBag
      • Methods inherited from class org.xml.sax.helpers.DefaultHandler

        characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
      • Methods inherited from class java.lang.Object

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

      • InterMineBagHandler

        public InterMineBagHandler​(ObjectStoreWriter uosw,
                                   ObjectStoreWriter osw,
                                   java.util.Map<java.lang.String,​InterMineBag> bags,
                                   java.util.Map<java.lang.String,​InvalidBag> invalidBags,
                                   java.util.Map<java.lang.String,​java.util.Set<BagValue>> bagsValues,
                                   java.lang.Integer userId)
        Create a new InterMineBagHandler object.
        Parameters:
        uosw - UserProfile ObjectStoreWriter
        osw - ObjectStoreWriter used to resolve object ids and write to the objectstore bag
        bags - Map from bag name to InterMineIdBag - results are added to this Map
        invalidBags - Accumulator for the bags of this user that are no longer valid.
        userId - the id of the user
        bagsValues - a Map from bag name to sets of bag values.
      • InterMineBagHandler

        public InterMineBagHandler​(ObjectStoreWriter uosw,
                                   ObjectStoreWriter osw,
                                   java.util.Map<java.lang.String,​InterMineBag> bags,
                                   java.util.Map<java.lang.String,​InvalidBag> invalidBags,
                                   java.util.Map<java.lang.String,​java.util.Set<BagValue>> bagsValues)
        Create a new InterMineBagHandler object.
        Parameters:
        uosw - UserProfile ObjectStoreWriter
        osw - ObjectStoreWriter used to resolve object ids and write to the objectstore bag
        bags - Map from bag name to InterMineIdBag - results are added to this Map
        invalidBags - list of invalid bags
        bagsValues - a Map from bagName to a set of bag values.
    • Method Detail

      • startElement

        public void startElement​(java.lang.String uri,
                                 java.lang.String localName,
                                 java.lang.String qName,
                                 org.xml.sax.Attributes attrs)
                          throws org.xml.sax.SAXException
        InvalidBag
        Specified by:
        startElement in interface org.xml.sax.ContentHandler
        Overrides:
        startElement in class org.xml.sax.helpers.DefaultHandler
        Throws:
        org.xml.sax.SAXException
      • endElement

        public void endElement​(java.lang.String uri,
                               java.lang.String localName,
                               java.lang.String qName)
                        throws org.xml.sax.SAXException
        Specified by:
        endElement in interface org.xml.sax.ContentHandler
        Overrides:
        endElement in class org.xml.sax.helpers.DefaultHandler
        Throws:
        org.xml.sax.SAXException