Package org.atomojo.app.client

Examples of org.atomojo.app.client.Link


         Element linkE = links.next();
         String href = linkE.getAttributeValue("href");
         if (href!=null) {
            URI tlocation = linkE.getBaseURI().resolve(href);
            String mtype = linkE.getAttributeValue("type");
            Link l = new Link(linkE.getAttributeValue("rel"),mtype==null ? null : MediaType.valueOf(mtype),tlocation);
            l.setIdentity(linkE.getAttributeValue("username"),linkE.getAttributeValue("password"));
            if (l.getRelation()!=null) {
               host.getLinks().put(l.getRelation(),l);
            }
         }
      }
      Iterator<Element> appElements = hostE.getElementsByName(APP);
      while (appElements.hasNext()) {
         Element appE = appElements.next();
         String appName = appE.getAttributeValue("name");
         String match = appE.getAttributeValue("match");
         AppDef def = appDefs.get(appName);
         if (def==null) {
            throw new XMLException("Cannot find defintion of application "+appName);
         }
         AppConf appconf = new AppConf(def,match,(Element)appE.copyOfItem(true),host.getLinks());

         Iterator<Element> appLinks = appE.getElementsByName(LINK);
         while (appLinks.hasNext()) {
            Element linkE = appLinks.next();
            String href = linkE.getAttributeValue("href");
            if (href!=null) {
               URI tlocation = linkE.getBaseURI().resolve(href);
               String mtype = linkE.getAttributeValue("type");
               Link l = new Link(linkE.getAttributeValue("rel"),mtype==null ? null : MediaType.valueOf(mtype),tlocation);
               l.setIdentity(linkE.getAttributeValue("username"),linkE.getAttributeValue("password"));
               if (l.getRelation()!=null) {
                  appconf.getLinks().put(l.getRelation(),l);
               }
            }
         }
         Iterator<Element> params = appE.getElementsByName(PARAMETER);
         while (params.hasNext()) {
View Full Code Here


            Element linkE = links.next();
            String href = linkE.getAttributeValue("href");
            if (href!=null) {
               URI tlocation = linkE.getBaseURI().resolve(href);
               String mtype = linkE.getAttributeValue("type");
               Link l = new Link(linkE.getAttributeValue("rel"),mtype==null ? null : MediaType.valueOf(mtype),tlocation);
               l.setIdentity(linkE.getAttributeValue("username"),linkE.getAttributeValue("password"));
               if (l.getRelation()!=null) {
                  iface.getLinks().put(l.getRelation(),l);
               }
            }
         }
        
         Iterator<Element> hostElements = interfaceE.getElementsByName(HOST);
View Full Code Here

TOP

Related Classes of org.atomojo.app.client.Link

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.