Package com.thoughtworks.xstream.io.xml

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


            this.endpoint = endpoint;
        }
        public DocumentFragment getAsReference(QName operationName) {
            try {
                SourceTransformer st = new SourceTransformer();
                String xml = new XStream(new DomDriver()).toXML(this);
                Document doc = (Document) st.toDOMNode(new StringSource(xml));
                DocumentFragment df = doc.createDocumentFragment();
                df.appendChild(doc.getDocumentElement());
                return df;
            } catch (Exception e) {
View Full Code Here


    private TemplateManager()  {
        allTemplates = readTemplates();           
    }
   
    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
View Full Code Here

        LinkedHashMap<String, Command> oldCommands = new LinkedHashMap<String, Command>();
        ArrayList<Command> addedCommands = new ArrayList<Command>();
        ArrayList<Command> removedCommands = new ArrayList<Command>();
        HashMap<String, Command> stableCommands = new HashMap<String, Command>();

        XStream xs = new XStream(new DomDriver());
        xs.alias("command", Command.class);
        xs.alias("arg", Argument.class);

        List<String> argsList = Arrays.asList(args);
        Iterator<String> iter = argsList.iterator();
View Full Code Here

            HttpClient client = new HttpClient();
            HttpMethod method = new GetMethod(url);
            if( client.executeMethod(method) == 200){
                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");
View Full Code Here

            String url = buildUrl(buildParams(command, params), region);
            HttpClient client = new HttpClient();
            HttpMethod method = new GetMethod(url);
            if( client.executeMethod(method) == 200){
                InputStream is = method.getResponseBodyAsStream();
                XStream xstream = new XStream(new DomDriver());
                //Translate response to Domain object
                xstream.alias("domain", RegionDomain.class);
                xstream.aliasField("id", RegionDomain.class, "uuid");
                xstream.aliasField("parentdomainid", RegionDomain.class, "parentUuid");
                xstream.aliasField("networkdomain", DomainVO.class, "networkDomain");
View Full Code Here

            String url = buildUrl(buildParams(command, params), region);
            HttpClient client = new HttpClient();
            HttpMethod method = new GetMethod(url);
            if( client.executeMethod(method) == 200){
                InputStream is = method.getResponseBodyAsStream();
                XStream xstream = new XStream(new DomDriver());
                xstream.alias("useraccount", UserAccountVO.class);
                xstream.aliasField("id", UserAccountVO.class, "uuid");
                ObjectInputStream in = xstream.createObjectInputStream(is);
                return (UserAccountVO)in.readObject();
            } else {
View Full Code Here

      return;
    }
   
    try{
      String filePath = chooser.getSelectedFile().getPath();
      XStream xstream = new XStream( new DomDriver() );
      FileReader fr = new FileReader(filePath);
      serializableConfList = (ScreenerConfList)xstream.fromXML(fr);

      confList.setModel( serializableConfList.confListModel);
View Full Code Here

 
  public static Configuration load(final String fp_confFilePath)
  {
    Configuration c = null;
    try{
      XStream xstream = new XStream( new DomDriver() );
      FileReader fr = new FileReader(fp_confFilePath);
      c =  (Configuration)xstream.fromXML(fr);     
    }
    catch(InitializationException e)
    {
View Full Code Here

    return c;
  }
 
  public boolean save(final String p)
  {
    XStream xstream = new XStream(new DomDriver());
   
    try {
      FileWriter fw = new FileWriter(p);
           xstream.toXML( this , fw );
        }
View Full Code Here

   
   
   
    public static void writeObject(final String path, Object obj)
    {
      XStream xstream = new XStream(new DomDriver());
      try {
        FileWriter fw = new FileWriter(path);
             xstream.toXML( obj, fw );
          }
      catch (IOException ex) {
View Full Code Here

TOP

Related Classes of com.thoughtworks.xstream.io.xml.DomDriver

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.