Examples of DomDriver


Examples of com.thoughtworks.xstream.io.xml.DomDriver

    private XStream xt;
    private static final ScenarioXMLPersistence INSTANCE = new ScenarioXMLPersistence();

    private ScenarioXMLPersistence() {
        xt = new XStream(new DomDriver());
        xt.alias("scenario", Scenario.class);
        xt.alias("execution-trace", ExecutionTrace.class);
        xt.alias("expectation", Expectation.class);
        xt.alias("fact-data", FactData.class);
        xt.alias("fact", Fact.class);
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomDriver

    private static final RuleModelUpgradeHelper3 upgrader3 = new RuleModelUpgradeHelper3();

    private static final BRLPersistence INSTANCE = new BRXMLPersistence();

    protected BRXMLPersistence() {
        this.xt = new XStream( new DomDriver() );

        this.xt.alias( "rule",
                       RuleModel.class );
        this.xt.alias( "fact",
                       FactPattern.class );
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomDriver

    private XStream                             xt;
    private static final RuleModelUpgradeHelper UPGRADER = new RuleModelUpgradeHelper();
    private static final BRLPersistence         INSTANCE = new BRXMLPersistence();

    protected BRXMLPersistence() {
        this.xt = new XStream( new DomDriver() );

        this.xt.alias( "rule",
                       RuleModel.class );
        this.xt.alias( "fact",
                       FactPattern.class );
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomDriver

    private XStream                                            xt;
    private static final GuidedDecisionTableModelUpgradeHelper UPGRADER = new GuidedDecisionTableModelUpgradeHelper();
    private static final GuidedDTXMLPersistence                INSTANCE = new GuidedDTXMLPersistence();

    private GuidedDTXMLPersistence() {
        xt = new XStream( new DomDriver() );

        //Legacy model
        xt.alias( "decision-table",
                  GuidedDecisionTable.class );
        xt.alias( "metadata-column",
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomDriver

     *
     * @param baseDirectory the directory for the serialized values
     * @since 1.3.1
     */
    public FilePersistenceStrategy(final File baseDirectory) {
        this(baseDirectory, new XStream(new DomDriver()));
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomDriver

    HierarchicalStreamReader reader = null;
    try
    {
      reader = new DomReader( getRootElement( xml, rootNodeName ) );
       
          XStream xstream = new XStream( new DomDriver() );
          xstream.alias(getAlias(incomingType), incomingType);
          addAliases( aliases, xstream );
            XStreamConfigurator.addFieldAliases(fieldAliases, xstream);
          addAttributeAliases( attributeAliases, xstream );
          addConverters( converters, xstream );
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomDriver

       
        Message oMsg = MessageFactory.getInstance().getMessage();
        oMsg.getBody().add(new TestBean("Tom", "1234"));
        oMsg = objectToXStream.process(oMsg);
        String xml = (String)oMsg.getBody().get();
        XStream xstream = new XStream(new DomDriver());
        TestBean bean = new TestBean();

        assertTrue("Expected [<TestBean>].  Got [" + xml + "]", xml.startsWith("<TestBean>"));
        xstream.alias("TestBean", TestBean.class);
        xstream.fromXML(xml, bean);
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomDriver

        Message oMsg = MessageFactory.getInstance().getMessage();
        oMsg.getBody().add(new TestBean("Tom", "1234"));
        objectToXStream.process(oMsg);
        String xml = (String)oMsg.getBody().get();

        XStream xstream = new XStream(new DomDriver());
        TestBean bean = new TestBean();

        assertTrue("Expected start with [<" + TestBean.class.getName() + ">].  Got [" + xml + "]", xml.startsWith("<" + TestBean.class.getName() + ">"));
        xstream.fromXML(xml, bean);
       
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomDriver

        Message oMsg = MessageFactory.getInstance().getMessage();
        oMsg.getBody().add(new TestBean("Tom", "1234"));
        objectToXStream.process(oMsg);
        String xml = (String)oMsg.getBody().get();

        XStream xstream = new XStream(new DomDriver());
        xstream.alias("TomsClass", TestBean.class);
        TestBean bean = new TestBean();

        assertTrue("Expected start with [<TomsClass>].  Got [" + xml + "]", xml.startsWith("<TomsClass>"));
        xstream.fromXML(xml, bean);
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomDriver

   }

   public Message insertOrder(Message message) throws Exception
   {
      Body msgBody = message.getBody();
      XStream xstream = new XStream(new DomDriver());
      xstream.alias("order", Order.class);
      Order order = (Order) xstream.fromXML((String) msgBody.get());

      PetStoreFacade petStore = (PetStoreFacade) getBeanFactory()
            .getBean("petStore");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.