Package org.myphotodiary.json

Examples of org.myphotodiary.json.JsonArray.addItem()


        List<Attribute> dirAttributes = directory.getAttributes();
        if (dirAttributes != null) {
          JsonArray attributes = new JsonArray();
          for (Attribute attribute: dirAttributes) {
            attributes.addItem(attribute.getName());
          }
          rsp.addParameter(Configuration.attrParam, attributes);
        }
      }
      else {
View Full Code Here


        .addParameter(Configuration.dateParam, img.getDate().toString());
        List<Attribute> imgAttributes = img.getAttributes();
        if (imgAttributes != null) {
          JsonArray attributes = new JsonArray();
          for (Attribute attribute: imgAttributes) {
            attributes.addItem(attribute.getName());
          }
          rsp.addParameter(Configuration.attrParam, attributes);
        }
      }
      else {
View Full Code Here

      }

      // Create Json response
      JsonArray rsp = new JsonArray();
      for (Attribute attribute: attributes) {
        rsp.addItem(attribute.getName());
      }
      getServletContext().log("Json response: " + rsp.toString());
      // Reply the Json response
      response.setContentType(Configuration.jsonContentType);
      response.setCharacterEncoding(Configuration.contentEncoding);
View Full Code Here

              + img.getDirectory().getPath() + "/"  + Configuration.webImgDirName + "/" + img.getName());
          imgList.addItem(im);
          th.addParameter(Configuration.urlParam, cfg.getImageRootUrl(request)
              + img.getDirectory().getPath() + "/"
              + Configuration.thumbDirName + "/" + img.getName());
          thumbList.addItem(th);
        }
        catch (AuthenticationException ex) {
          // access not allowed, skip
        }
      }
View Full Code Here

        .addParameter(Configuration.dateParam, img.getDate().toString());
        List<Attribute> imgAttributes = img.getAttributes();
        if (imgAttributes != null) {
          JsonArray attributes = new JsonArray();
          for (Attribute attribute: imgAttributes) {
            attributes.addItem(attribute.getName());
          }
          rsp.addParameter(Configuration.attrParam, attributes);
        }
      }
      else {
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.