Examples of DomDriver


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

    xstreamDataHolder.put(ReviewExternalizerXmlImpl.CONTEXT_KEY_REVIEW, review);
    xstreamDataHolder.put(ReviewExternalizerXmlImpl.CONTEXT_KEY_PREPARE_MODE, prepareMode);

    try
    {
      xstream.unmarshal(new DomDriver().createReader(new InputStreamReader(stream, "UTF-8")), null, xstreamDataHolder);
    }
    catch (Exception e)
    {
      LOGGER.warn(e);
      throw new RevuException(e);
View Full Code Here

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

     * @param out An output stream to write to. It will be closed by the this method.
     * @throws java.io.IOException When there is a problem creating the stream, or
     * the other end of the stream fails.
     */
    private void write(OutputStream out) throws IOException {
        XStream xstream = new XStream(new DomDriver());
        xstream.registerConverter(ROLEMAPCONVERTER);
        xstream.registerConverter(ROLECONVERTER);
        xstream.registerConverter(DICTCONVERTER);
        xstream.aliasType("roles", Map.class);
        xstream.toXML(m_roles, out);
View Full Code Here

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

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

    private 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

    return result.toByteArray();
  }

  private byte[] toXML(Fact[] facts) {
    XStream x = new XStream(new DomDriver());
    return x.toXML(facts).getBytes();

  }
View Full Code Here

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

        throw new IllegalArgumentException("This is not a valid drools model jar - no factmodel.xml found.");
  }

  private Fact[] fromXML(JarInputStream jis) {
    XStream x = new XStream(new DomDriver());
    return (Fact[]) x.fromXML(jis);

  }
View Full Code Here

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

    private static final TemplateModelUpgradeHelper1 ruleTemplateModelUpgrader1 = new TemplateModelUpgradeHelper1();

    private static final RuleTemplateModelPersistence INSTANCE = new RuleTemplateModelXMLPersistenceImpl();

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

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

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

    private static final GuidedDecisionTableUpgradeHelper2 upgrader2 = new GuidedDecisionTableUpgradeHelper2();
    private static final GuidedDecisionTableUpgradeHelper3 upgrader3 = new GuidedDecisionTableUpgradeHelper3();
    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

        this.age = age;
    }

    public String toString() {
        Writer w = new StringWriter();
        XStream xstream = new XStream(new DomDriver());
        xstream.alias("person", PersonImpl.class);
        xstream.aliasField("given-name", PersonImpl.class, "givenName");
        xstream.aliasField("sur-name", PersonImpl.class, "surName");
        xstream.toXML(this, w);
        return w.toString();
View Full Code Here

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

        TransformComponentSupport rmiComponent = new TransformComponentSupport() {
            protected boolean transform(MessageExchange exchange, NormalizedMessage in, NormalizedMessage out)
                throws MessagingException {
                try {
                    // Deserialize rmi invocation
                    XStream xstream = new XStream(new DomDriver());
                    SourceTransformer st = new SourceTransformer();
                    Object rmi = xstream.fromXML(st.toString(in.getContent()));

                    DefaultRemoteInvocationExecutor executor = new DefaultRemoteInvocationExecutor();
                    Object result = executor.invoke((RemoteInvocation) rmi, person);
View Full Code Here

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

     * @throws ClassNotFoundException
     */
    private Source marshal(InputStream is) throws IOException, ClassNotFoundException {
        Object obj = new ObjectInputStream(is).readObject();
        Writer w = new StringWriter();
        XStream xstream = new XStream(new DomDriver());
        xstream.toXML(obj, w);
        String request = w.toString();

        if (log.isDebugEnabled()) {
            log.debug("Remote invocation request: " + request);
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.