Package de.danet.an.util.sax

Examples of de.danet.an.util.sax.HandlerStack$MyHandler


   Map actSetDefs, String blkActId,
   JoinAndSplitMode joinMode, JoinAndSplitMode splitMode)
  throws SAXException {
  super (key);
  allActs = new HashMap ();
  HandlerStack hs = new HandlerStack
      (new BlockActivityInitializer
       (proc, actSetDefs, blkActId, joinMode, splitMode));
  hs.setContextData ("packageId", packageId);
  actSetDef.emit(hs.contentHandler());
    }
View Full Code Here


     */
    public void startElement (String namespaceURI, String localName,
            String qName, Attributes atts)
    throws SAXException {
        try {
            HandlerStack stack = getStack();
            SOAPEnvelope env = (SOAPEnvelope) stack.getContextData ("envelope");
            String prefix = stack.getPrefixForURI(namespaceURI);
            Name name = env.createName (localName, prefix, namespaceURI);
            SOAPElement parent = (SOAPElement)elemStack.get(0);
            SOAPElement current = null;
            if (parent instanceof SOAPBody) {
                current = ((SOAPBody)parent).addBodyElement (name);
View Full Code Here

    }

    private void appendNodes
    (SOAPEnvelope env, SOAPElement root, SAXEventBuffer data)
    throws SAXException {
        HandlerStack hs = new HandlerStack (new SOAPBuilder (root));
        hs.setContextData ("envelope", env);
        data.emit(hs.contentHandler());
    }
View Full Code Here

    /**
     * Simple parsing test
     */
    public void simpleParse() throws Exception {
  XMLReader reader = getReader();
  HandlerStack stack = new HandlerStack (reader, new StackedHandler());
  reader.parse
      (new InputSource
       (Sax.class.getResourceAsStream("/util/testXPDL.xml")));
    }
View Full Code Here

      + "/{http://www.wfmc.org/2002/XPDL1.0}WorkflowProcess"
      + "/{http://www.wfmc.org/2002/XPDL1.0}Activities"
      + "/{http://www.wfmc.org/2002/XPDL1.0}Activity"
      + "/{http://www.wfmc.org/2002/XPDL1.0}TransitionRestrictions";
  XMLReader reader = getReader();
  HandlerStack stack = new HandlerStack
      (reader, new StackedHandler() {
        public void startElement
      (String uri, String localName, String qName,
       Attributes atts) throws SAXException {
      outerTags.add (qName);
      if (qName.equals ("TransitionRestrictions")) {
          assertTrue (currentPath().equals(expPath));
          getStack().push (new SubHandler());
      }
        }
    });
  stack.setContextData ("innerTags", innerTags);
  reader.parse
      (new InputSource
       (Sax.class.getResourceAsStream("/util/testXPDL.xml")));
  assertTrue (outerTags.contains ("Activity"));
  assertTrue (outerTags.contains ("TransitionRestrictions"));
View Full Code Here

        super.startElement (uri, localName, qName, atts);
    }
      };
  dh.addHandler ("http://www.wfmc.org/2002/XPDL1.0",
           "TransitionRestrictions", SubHandler.class);
  HandlerStack stack = new HandlerStack (reader, dh);
  stack.setContextData ("innerTags", innerTags);
  reader.parse
      (new InputSource
       (Sax.class.getResourceAsStream("/util/testXPDL.xml")));
  assertTrue (outerTags.contains ("Activity"));
  assertTrue (outerTags.contains ("TransitionRestrictions"));
View Full Code Here

      };
  dh.addHandler
      ("{http://www.wfmc.org/2002/XPDL1.0}Activity"
       + "/{http://www.wfmc.org/2002/XPDL1.0}TransitionRestrictions",
       SubHandler.class);
  HandlerStack stack = new HandlerStack (reader, dh);
  stack.setContextData ("innerTags", innerTags);
  reader.parse
      (new InputSource
       (Sax.class.getResourceAsStream("/util/testXPDL.xml")));
  assertTrue (outerTags.contains ("Activity"));
  assertTrue (outerTags.contains ("TransitionRestrictions"));
View Full Code Here

       + "/{http://www.wfmc.org/2002/XPDL1.0}WorkflowProcess"
       + "/{http://www.wfmc.org/2002/XPDL1.0}Activities"
       + "/{http://www.wfmc.org/2002/XPDL1.0}Activity"
       + "/{http://www.wfmc.org/2002/XPDL1.0}TransitionRestrictions",
       SubHandler.class);
  HandlerStack stack = new HandlerStack (reader, dh);
  stack.setContextData ("innerTags", innerTags);
  reader.parse
      (new InputSource
       (Sax.class.getResourceAsStream("/util/testXPDL.xml")));
  assertTrue (outerTags.contains ("Activity"));
  assertTrue (outerTags.contains ("TransitionRestrictions"));
View Full Code Here

         DefaultParticipant.SAXInitializer.class);
      StackedHandler extAttrHandler = new SAXExtAttrHandler ();
      dh.addHandler (packagePath + extAttrRelPath, extAttrHandler);
      dh.addHandler (processPath + extAttrRelPath, extAttrHandler);
      applications = new HashMap ();
      HandlerStack hs = new HandlerStack (dh);
      procDef.emit(hs.contentHandler(), null);
      for (Iterator i = applications().iterator(); i.hasNext();) {
          ApplicationDefinition applDef
              = (ApplicationDefinition)i.next();
                postfixApplicationDefinition(applDef);
      }
View Full Code Here

    private void subtreeToSAX (Element e, ContentHandler h) {
  try {
      SAXEventBufferImpl buf = new SAXEventBufferImpl ();
      SAXOutputter out = new SAXOutputter (buf);
      out.output(new Document((Element)e.clone()));
      HandlerStack hs = new HandlerStack (h);
      buf.emit (hs.contentHandler());
  } catch (JDOMException ex) {
      throw new IllegalArgumentException (ex.getMessage ());
  } catch (SAXException ex) {
      throw new IllegalArgumentException (ex.getMessage ());
  }
View Full Code Here

TOP

Related Classes of de.danet.an.util.sax.HandlerStack$MyHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.