Package com.thoughtworks.xstream

Examples of com.thoughtworks.xstream.XStream.useAttributeFor()


        stream.addImplicitCollection(Page.class, "link");
        stream.alias("results", Results.class);
        stream.alias("result", Page.class);
        stream.alias("content", Page.class);
        stream.alias("link", Link.class);
        stream.useAttributeFor(Link.class, "rel");
        stream.useAttributeFor(Link.class, "href");
        stream.ignoreUnknownElements();
        return stream;
    }
View Full Code Here


        stream.alias("results", Results.class);
        stream.alias("result", Page.class);
        stream.alias("content", Page.class);
        stream.alias("link", Link.class);
        stream.useAttributeFor(Link.class, "rel");
        stream.useAttributeFor(Link.class, "href");
        stream.ignoreUnknownElements();
        return stream;
    }

    public static class Results {
View Full Code Here

      return json;
    case XML:
      page.xmlns = "http://www.xwiki.org";
      XStream xstream = new XStream();
      xstream.alias("page", Page.class);
      xstream.useAttributeFor(Page.class, "xmlns");
            xstream.aliasField("xmlns", Page.class, "xmlns");
            xstream.ignoreUnknownElements();
      String xml = xstream.toXML(page);
      return xml;
    default:
View Full Code Here

   
    private XStream initXStream() {
        XStream xstream = new XStream(new DomDriver());
        xstream.alias("template", Template.class);
        xstream.alias("templates", Templates.class);
        xstream.useAttributeFor(Template.class, "isTestPlan");
       
        // templates i
        xstream.addImplicitMap(Templates.class,
                // field TemplateManager#templates
                "templates", // $NON-NLS-1$
View Full Code Here

    xstream.alias("method", Method.class);
    xstream.alias("parameter", Parameter.class);
   
  //  Attributes declaration
  //
    xstream.useAttributeFor(AdditionalCode.class, "suffix");
    xstream.useAttributeFor(AdditionalCode.class, "implementedInterface");
   
    xstream.useAttributeFor(Attribute.class, "name");
    xstream.useAttributeFor(Attribute.class, "visibility");
    xstream.useAttributeFor(Attribute.class, "type");
View Full Code Here

    xstream.alias("parameter", Parameter.class);
   
  //  Attributes declaration
  //
    xstream.useAttributeFor(AdditionalCode.class, "suffix");
    xstream.useAttributeFor(AdditionalCode.class, "implementedInterface");
   
    xstream.useAttributeFor(Attribute.class, "name");
    xstream.useAttributeFor(Attribute.class, "visibility");
    xstream.useAttributeFor(Attribute.class, "type");
    xstream.useAttributeFor(Attribute.class, "collectionType");
View Full Code Here

  //  Attributes declaration
  //
    xstream.useAttributeFor(AdditionalCode.class, "suffix");
    xstream.useAttributeFor(AdditionalCode.class, "implementedInterface");
   
    xstream.useAttributeFor(Attribute.class, "name");
    xstream.useAttributeFor(Attribute.class, "visibility");
    xstream.useAttributeFor(Attribute.class, "type");
    xstream.useAttributeFor(Attribute.class, "collectionType");
    xstream.useAttributeFor(Attribute.class, "defaultValue");
   
View Full Code Here

  //
    xstream.useAttributeFor(AdditionalCode.class, "suffix");
    xstream.useAttributeFor(AdditionalCode.class, "implementedInterface");
   
    xstream.useAttributeFor(Attribute.class, "name");
    xstream.useAttributeFor(Attribute.class, "visibility");
    xstream.useAttributeFor(Attribute.class, "type");
    xstream.useAttributeFor(Attribute.class, "collectionType");
    xstream.useAttributeFor(Attribute.class, "defaultValue");
   
    xstream.useAttributeFor(Constructor.class, "visibility");
View Full Code Here

    xstream.useAttributeFor(AdditionalCode.class, "suffix");
    xstream.useAttributeFor(AdditionalCode.class, "implementedInterface");
   
    xstream.useAttributeFor(Attribute.class, "name");
    xstream.useAttributeFor(Attribute.class, "visibility");
    xstream.useAttributeFor(Attribute.class, "type");
    xstream.useAttributeFor(Attribute.class, "collectionType");
    xstream.useAttributeFor(Attribute.class, "defaultValue");
   
    xstream.useAttributeFor(Constructor.class, "visibility");
View Full Code Here

    xstream.useAttributeFor(AdditionalCode.class, "implementedInterface");
   
    xstream.useAttributeFor(Attribute.class, "name");
    xstream.useAttributeFor(Attribute.class, "visibility");
    xstream.useAttributeFor(Attribute.class, "type");
    xstream.useAttributeFor(Attribute.class, "collectionType");
    xstream.useAttributeFor(Attribute.class, "defaultValue");
   
    xstream.useAttributeFor(Constructor.class, "visibility");

    xstream.useAttributeFor(Method.class, "visibility");
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.