Package com.esri.gpt.framework.collection

Examples of com.esri.gpt.framework.collection.StringAttribute


  for (int i = 0; i < nlParameters.getLength(); i++) {
    Node ndParameter = nlParameters.item(i);
    String sKey = Val.chkStr(xpath.evaluate("@key", ndParameter));
    String sValue = Val.chkStr(xpath.evaluate("@value", ndParameter));
    if (sKey.length() > 0) {
      parameters.add(new StringAttribute(sKey, sValue));
    }
  }
}
View Full Code Here


      }
      else if (paramName.equalsIgnoreCase("url")) {
        record.setHostUrl(paramValue);
      }
      else if (paramName.equalsIgnoreCase("soapurl")) {
        attributes.add(new StringAttribute(ArcGISProtocol.SOAP_URL,paramValue));
      }
      else if (paramName.equalsIgnoreCase("protocol")) {
        ProtocolFactory factory = appCfg.getProtocolFactories().get(paramValue);
        if (factory!=null) {
          record.setProtocol(factory.newProtocol());
        }
      }
      else if (paramName.equalsIgnoreCase("frequency")) {
        record.setHarvestFrequency(HarvestFrequency.checkValueOf(paramValue));
      }
      else if (paramName.equalsIgnoreCase("sendNotification")) {
        record.setSendNotification(Val.chkBool(paramValue, false));
      }
      else if (paramName.equalsIgnoreCase("updateContent")) {
        updateContent = Val.chkBool(paramValue, true);
      }
      else if (paramName.equalsIgnoreCase("updateDefinition")) {
        updateDefinition = Val.chkBool(paramValue, true);
      }
      else if (paramName.equalsIgnoreCase("autoApprove")) {
        autoApprove = Val.chkBool(paramValue, true);
      }
      else if (paramName.equalsIgnoreCase("findable")) {
        record.setFindable(Val.chkBool(paramValue, true));
      }
      else if (paramName.equalsIgnoreCase("searchable")) {
        record.setSearchable(Val.chkBool(paramValue, true));
      }
      else if (paramName.equalsIgnoreCase("synchronizable")) {
        record.setSynchronizable(Val.chkBool(paramValue, true));
      }
      else {
        attributes.add(new StringAttribute(paramName,paramValue));
      }
    }

    if (record.getProtocol()==null || record.getProtocol().getKind().equalsIgnoreCase(ProtocolType.None.name())) {
      ProtocolFactory factory = appCfg.getProtocolFactories().get(ProtocolType.RES.name());
View Full Code Here

  }

  @Override
  public StringAttributeMap getAttributeMap() {
    StringAttributeMap attributes = new StringAttributeMap();
    attributes.add(new StringAttribute(SOAP_URL, soapUrl));
    return attributes;
  }
View Full Code Here

  String resourceKey = "catalog.rest.open";
  ResourceLink link = this.makeLink(resourceUrl, ResourceLink.TAG_OPEN,
      resourceKey);
  if (serviceType.length() > 0) {
    link.getParameters().add(new StringAttribute(RESOURCE_TYPE, serviceType));
  }
  record.getResourceLinks().add(link);
 
  //this.makeAddToMapFromFactory(resourceUrl, null, resourceKey, record);
 
View Full Code Here

    url += "&info=" + encodeUrlParam(infoUrl);
  }
  String resourceKey = "catalog.rest.preview";
  ResourceLink link = this.makeLink(url, ResourceLink.TAG_PREVIEW, resourceKey);
  if (serviceType.length() > 0) {
    link.getParameters().add(new StringAttribute(RESOURCE_TYPE, serviceType));
  }
  if(record.isExternal()){
    link.setForExtenalRecord(true);
  }
  record.getResourceLinks().add(link);
View Full Code Here

    String sDest = getDestinations(protocol);
    sb.append("<protocol type=\"").append(protocol.getKind()).append("\" flags=\"").append(protocol.getFlags()).append("\"").append(sDest!=null? " destinations=\"" +sDest+ "\"": "").append(" adHoc=\"" +protocol.getAdHoc()+ "\"").append(">");

    StringAttributeMap attributes = protocol.extractAttributeMap();
    for (String key : attributes.keySet()) {
      StringAttribute value = attributes.get(key);
      sb.append("<").append(key).append(">").append(value.getValue()).
          append("</").append(key).append(">");
    }

    sb.append("</protocol>");
  } else {
View Full Code Here

          StringAttributeMap attributes = new StringAttributeMap();
          JSONArray names = candidateAttributes.names();
          for (int n = 0; n < (names != null ? names.length() : 0); n++) {
            String name = names.getString(n);
            String value = candidateAttributes.getString(name);
            attributes.add(new StringAttribute(name, value));
          }

          Candidate candidate = new Candidate();
          candidate.setAddress(candidateAddress);
          candidate.setLocation(new double[]{candidateX, candidateY});
View Full Code Here

          for (int i=0; i< nl.getLength(); i++) {
            Node nd = nl.item(i);
            String key = Val.chkStr(xpath.evaluate("@key",nd));
            String value = Val.chkStr(xpath.evaluate("@value",nd));
            if (key.length() > 0) {
              config.add(new StringAttribute(key,value));
            }
          }         
        } catch (ParserConfigurationException e) {
          LOGGER.log(Level.SEVERE,err,e);
        } catch (SAXException e) {
View Full Code Here

  public String toString() {
    StringBuilder sb = new StringBuilder();

    sb.append(getKind());
    for (String key : extractAttributeMap().keySet()) {
      StringAttribute value = extractAttributeMap().get(key);
      sb.append(" ").append(key).append(":").append(value.getValue());
    }

    return sb.toString();
  }
View Full Code Here

    String infoUrl = baseContextPath + this.metadataPath + "?f=html&showRelativeUrl=true&id=" + encodeUrlParam(id);
    url += "&info=" + encodeUrlParam(infoUrl);
    String resourceKey = "catalog.rest.preview";
    ResourceLink link = this.makeLink(url, ResourceLink.TAG_PREVIEW, resourceKey);
    if (serviceType.length() > 0) {
      link.getParameters().add(new StringAttribute("resourceType", serviceType));
    }
    record.getResourceLinks().add(link);
  }
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.collection.StringAttribute

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.