Package com.esri.gpt.framework.collection

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


    MessageBroker msgBroker = null;
   
    // determine the request type and execute
    try {
      String sLcUri = request.getRequestURI().toLowerCase();
      StringAttributeMap cfg = context.getCatalogConfiguration().getParameters();
      int maxItems = Val.chkInt(cfg.getValue("catalog.cart.maxItems"),10);
       
      // determine the response format
      String f = Val.chkStr(request.getParameter("f"));
      if (f.equalsIgnoreCase("pjson")) {
        sMimeType = "text/plain";
View Full Code Here


    String resourceXml = serviceInfo.asDublinCore(processor);
    processor.publishMetadata(resourceUrl,resourceXml);
   
    // configuration parameters for data element recursion
    RequestContext rContext = processor.getContext().getRequestContext();
    StringAttributeMap params = rContext.getCatalogConfiguration().getParameters();
    boolean recurse = true;
    if (Val.chkStr(params.getValue("AGSProcessor.GeoDataServer.recurse")).equalsIgnoreCase("false")) {
      recurse = false;
    }
    boolean expandDescendants = false;
    if (Val.chkStr(params.getValue("AGSProcessor.GeoDataServer.expandDescendants")).equalsIgnoreCase("true")) {
      expandDescendants= true;
    }
    int maxDataElements = Val.chkInt(params.getValue("AGSProcessor.GeoDataServer.maxDataElements"),200);
    if (maxDataElements == 0) {
      recurse = false;
    }
   
    if (recurse) {
View Full Code Here

    super.appendRecord(records, factory, serviceInfo, isNative);

    // configuration parameters for data element recursion
    ApplicationContext appCtx = ApplicationContext.getInstance();
    ApplicationConfiguration cfg = appCtx.getConfiguration();
    StringAttributeMap params = cfg.getCatalogConfiguration().getParameters();
    boolean recurse = true;
    if (Val.chkStr(params.getValue("AGSProcessor.GeoDataServer.recurse")).equalsIgnoreCase("false")) {
      recurse = false;
    }
    boolean expandDescendants = false;
    if (Val.chkStr(params.getValue("AGSProcessor.GeoDataServer.expandDescendants")).equalsIgnoreCase("true")) {
      expandDescendants= true;
    }
    int maxDataElements = Val.chkInt(params.getValue("AGSProcessor.GeoDataServer.maxDataElements"),200);
    if (maxDataElements == 0) {
      recurse = false;
    }
    if (recurse) {
View Full Code Here

  /**
   * Gets the configuration.
   * @return the configuration (can be null)
   */
  public StringAttributeMap getConfiguration() {
    StringAttributeMap config = IntegrationContextFactory.CONFIG;
    if (config != null) {
      return config;
    } else {
      configure();
      return IntegrationContextFactory.CONFIG;
View Full Code Here

 
  /**
   * Builds the configuration if necessary.
   */
  private synchronized void configure() {
    StringAttributeMap config = IntegrationContextFactory.CONFIG;
    if (config == null) {
      config = new StringAttributeMap();
     
      String configFile = IntegrationContextFactory.CONFIG_FILE;
      URL configUrl = null;
      ResourcePath rp = new ResourcePath();
      try {
        configUrl = rp.makeUrl(configFile);
      } catch (IOException e) {
        LOGGER.finer(configFile+" was not loaded.");
      }
      if (configUrl != null) {
       
        String err = "Exception while loading: "+configFile;
        try {
          LOGGER.config("Loading configuration file: "+configFile);
          Document dom = DomUtil.makeDomFromResourcePath(configFile,false);
          XPath xpath = XPathFactory.newInstance().newXPath();
          NodeList nl = (NodeList)xpath.evaluate("//parameter",dom,XPathConstants.NODESET);
          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

  /**
   * Determines if the integrating is enabled.
   * @return <code>true</code> if enabled
   */
  public boolean isIntegrationEnabled() {
    StringAttributeMap config = this.getConfiguration();
    if (config != null) {
      String val = Val.chkStr(config.getValue("sdisuite.enabled"));
      return (val.equalsIgnoreCase("true"));
    }
    return false;
  }
View Full Code Here

   * @throws IllegalAccessException if the class could not be accessed
   */
  public IntegrationContext newIntegrationContext()
    throws ClassNotFoundException, InstantiationException, IllegalAccessException {
   
    StringAttributeMap config = this.getConfiguration();
    if (config == null) {
      return null;
    } else {
      String val = Val.chkStr(config.getValue("sdisuite.enabled"));
      if (!val.equalsIgnoreCase("true")) {
        return null;
      }
    }
   
    String key = "sdisuite.integrationContextClass";
    String className =Val.chkStr(config.getValue(key));
    if (className.length() == 0) {
      String msg = "The configured "+key+" was empty";
      throw new ConfigurationException(msg);
    } else {
      Class<?> cls = Class.forName(className);
View Full Code Here

  /**
   * Sets attributes.
   * @param attributes attributes
   */
  public void setAttributes(StringAttributeMap attributes) {
    this.attributes = attributes != null ? attributes : new StringAttributeMap();
  }
View Full Code Here

   * @param context the request filter
   * @param chained a chained filter
   * @return the filter (null if not applicable)
   */
  public static Filter make(RequestContext context, Filter chained) {
    StringAttributeMap params = context.getCatalogConfiguration().getParameters();
    String s = Val.chkStr(params.getValue("lucene.force.isPartOf"));
    if (s.length() > 0) {
      if (s.indexOf(",") == -1) {
        String[] values = new String[]{s};
        return new IsPartOfFilter("isPartOf",values,chained);
      } else {
View Full Code Here

     * @param writer response writer
     */
  public HarvesterStatisticsDao(ResponseWriter writer){
    this.writer = writer;
    this.statWriter = (IStatisticsWriter) writer;
    StringAttributeMap params  = ApplicationContext.getInstance().getConfiguration().getCatalogConfiguration().getParameters();
      String s = Val.chkStr(params.getValue("database.isCaseSensitive"));
      isDbCaseSensitive = !s.equalsIgnoreCase("false");

  }
View Full Code Here

TOP

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

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.