Package com.thoughtworks.xstream

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


    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:
      return resource.getContent();
View Full Code Here


    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

    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

        xstream.alias("envelope", GeneralEnvelope.class);
        xstream.alias("WCS", WCSConfig.class);
        xstream.alias("WFS", WFSConfig.class);
        xstream.alias("WMS", WMSConfig.class);
        xstream.alias("crs", CoordinateReferenceSystem.class);
        xstream.aliasField("abstract", WMSConfig.class, "__abstract");
        xstream.registerConverter(new CRSConverter());
        return xstream;
    }

}
View Full Code Here

                InputStream is = method.getResponseBodyAsStream();
                //Translate response to Account object
                XStream xstream = new XStream(new DomDriver());
                xstream.alias("account", RegionAccount.class);
                xstream.alias("user", RegionUser.class);
                xstream.aliasField("id", RegionAccount.class, "uuid");
                xstream.aliasField("name", RegionAccount.class, "accountName");
                xstream.aliasField("accounttype", RegionAccount.class, "type");
                xstream.aliasField("domainid", RegionAccount.class, "domainUuid");
                xstream.aliasField("networkdomain", RegionAccount.class, "networkDomain");
                xstream.aliasField("id", RegionUser.class, "uuid");
View Full Code Here

                //Translate response to Account object
                XStream xstream = new XStream(new DomDriver());
                xstream.alias("account", RegionAccount.class);
                xstream.alias("user", RegionUser.class);
                xstream.aliasField("id", RegionAccount.class, "uuid");
                xstream.aliasField("name", RegionAccount.class, "accountName");
                xstream.aliasField("accounttype", RegionAccount.class, "type");
                xstream.aliasField("domainid", RegionAccount.class, "domainUuid");
                xstream.aliasField("networkdomain", RegionAccount.class, "networkDomain");
                xstream.aliasField("id", RegionUser.class, "uuid");
                xstream.aliasField("accountId", RegionUser.class, "accountUuid");
View Full Code Here

                XStream xstream = new XStream(new DomDriver());
                xstream.alias("account", RegionAccount.class);
                xstream.alias("user", RegionUser.class);
                xstream.aliasField("id", RegionAccount.class, "uuid");
                xstream.aliasField("name", RegionAccount.class, "accountName");
                xstream.aliasField("accounttype", RegionAccount.class, "type");
                xstream.aliasField("domainid", RegionAccount.class, "domainUuid");
                xstream.aliasField("networkdomain", RegionAccount.class, "networkDomain");
                xstream.aliasField("id", RegionUser.class, "uuid");
                xstream.aliasField("accountId", RegionUser.class, "accountUuid");
                ObjectInputStream in = xstream.createObjectInputStream(is);
View Full Code Here

                xstream.alias("account", RegionAccount.class);
                xstream.alias("user", RegionUser.class);
                xstream.aliasField("id", RegionAccount.class, "uuid");
                xstream.aliasField("name", RegionAccount.class, "accountName");
                xstream.aliasField("accounttype", RegionAccount.class, "type");
                xstream.aliasField("domainid", RegionAccount.class, "domainUuid");
                xstream.aliasField("networkdomain", RegionAccount.class, "networkDomain");
                xstream.aliasField("id", RegionUser.class, "uuid");
                xstream.aliasField("accountId", RegionUser.class, "accountUuid");
                ObjectInputStream in = xstream.createObjectInputStream(is);
                return (RegionAccount)in.readObject();
View Full Code Here

                xstream.alias("user", RegionUser.class);
                xstream.aliasField("id", RegionAccount.class, "uuid");
                xstream.aliasField("name", RegionAccount.class, "accountName");
                xstream.aliasField("accounttype", RegionAccount.class, "type");
                xstream.aliasField("domainid", RegionAccount.class, "domainUuid");
                xstream.aliasField("networkdomain", RegionAccount.class, "networkDomain");
                xstream.aliasField("id", RegionUser.class, "uuid");
                xstream.aliasField("accountId", RegionUser.class, "accountUuid");
                ObjectInputStream in = xstream.createObjectInputStream(is);
                return (RegionAccount)in.readObject();
            } else {
View Full Code Here

                xstream.aliasField("id", RegionAccount.class, "uuid");
                xstream.aliasField("name", RegionAccount.class, "accountName");
                xstream.aliasField("accounttype", RegionAccount.class, "type");
                xstream.aliasField("domainid", RegionAccount.class, "domainUuid");
                xstream.aliasField("networkdomain", RegionAccount.class, "networkDomain");
                xstream.aliasField("id", RegionUser.class, "uuid");
                xstream.aliasField("accountId", RegionUser.class, "accountUuid");
                ObjectInputStream in = xstream.createObjectInputStream(is);
                return (RegionAccount)in.readObject();
            } else {
                return null;
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.