Package com.esri.gpt.agp.client

Examples of com.esri.gpt.agp.client.AgpProperty


    if (serviceInfo!=null) {
      AgpItem agpItem = new AgpItem();
      AgpProperties props = agpItem.getProperties();
      String type = serviceInfo.getType();
     
      props.add(new AgpProperty("title", Val.chkStr(serviceInfo.getName())));
      props.add(new AgpProperty("name", Val.chkStr(serviceInfo.getName())));
      props.add(new AgpProperty("url", Val.chkStr(serviceInfo.getRestUrl())));
      props.add(new AgpProperty("description", Val.chkStr(serviceInfo.getDescription())));
     
      String thumbnailUrl = Val.chkStr(serviceInfo.getThumbnailUrl());
      if (!thumbnailUrl.isEmpty()) {
        props.add(new AgpProperty("thumbnailurl", thumbnailUrl));
      }
     
      String textInfo = Val.chkStr(serviceInfo.getText());
      if (!textInfo.isEmpty()) {
        props.add(new AgpProperty("text", textInfo));
      }
     
      String envelope = Val.chkStr(envelopeToString(serviceInfo.getEnvelope()));
      if (!envelope.isEmpty()) {
        props.add(new AgpProperty("extent", envelope));
      }
     
      String agpType = agsToAgpType.get(type);
      if (agpType!=null) {
        props.add(new AgpProperty("type", agpType));
        return agpItem;
      }
    }
    return null;
  }
View Full Code Here


    JSONObject jso = client.executeJsonRequest(sUrl,hdr,provider);
   
    if (jso.has("id") && jso.has("success") && jso.getString("success").equals("true")) {
      if (sDestId == null) {
        sDestId = jso.getString("id");
        sourceItem.getProperties().add(new AgpProperty("id",sDestId));
     
      /*
      if (bInsert) {
        this.numItemsInserted++;
        LOGGER.finer("Item inserted: "+sUrl);
View Full Code Here

    };
   
    AgpProperties sourceProps = sourceItem.getProperties();
    AgpProperties destProps = destItem.getProperties();
    for (String sProp: aProps) {
      AgpProperty sourceProp = sourceProps.get(sProp);
      if (sourceProp != null) {
        String sValue = sourceProp.getValue();
        if (sValue == null) sValue = "";
        else sValue = sValue.trim();
        if (sValue.length() > 0) {
          //System.err.println(sProp+"=push="+sValue);
          destProps.add(new AgpProperty(sourceProp.getName(),sValue));
        }
      }
    }
   
    String sTypeKeywords = this.makeDestinationTypeKeywords(source,sourceItem);
    destProps.add(new AgpProperty("typeKeywords",sTypeKeywords));
   
    // TODO: item property?
    /*
    String sSrcItemType = sourceProps.getValue("itemType");
    if ((sSrcItemType != null) && (sSrcItemType.equals("url"))) {
View Full Code Here

      AgpDestination destination, AgpItem destItem) throws Exception {
    boolean bRequiresUpdate = true;
    AgpItem existingDestItem = this.queryDestinationItem(destination,sourceItem);
    if (existingDestItem != null) {
      String sDestID = existingDestItem.getProperties().getValue("id");
      destItem.getProperties().add(new AgpProperty("id",sDestID));
      String sTMod = existingDestItem.getProperties().get("modified").getValue();
      String sSMod = sourceItem.getProperties().get("modified").getValue();
      long nTMod = Long.valueOf(sTMod);
      long nSMod = Long.valueOf(sSMod);
      long nDiff = nSMod - nTMod;
View Full Code Here

    AgpClient client = dest.getConnection().ensureClient();
    JSONObject jso = client.executeJsonRequest(sUrl,hdr,provider);
    if (jso.has("id") && jso.has("success") && jso.getString("success").equals("true")) {
      if (sDestId == null) {
        sDestId = jso.getString("id");
        destItem.getProperties().add(new AgpProperty("id",sDestId));
     
      if (bInsert) {
        this.numItemsInserted++;
        LOGGER.finer("Item inserted: "+sUrl);
      } else {
View Full Code Here

TOP

Related Classes of com.esri.gpt.agp.client.AgpProperty

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.