Package com.esri.gpt.framework.collection

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


  /**
   * Gets host URL.
   * @return host URL
   */
  public String getHostUrl() {
    StringAttributeMap attrs = getAttributeMap();
    return "http://" + getSourceHost() + "?q=" + attrs.getValue("src-q") + "&user=" +attrs.getValue("src-u")+ "&max=" + attrs.getValue("src-m") +
            "&dest=http://" + getDestinationHost() + "/" + attrs.getValue("dest-o"+ "/" + attrs.getValue("dest-f") + "&destuser=" + attrs.getValue("dest-u");
  }
View Full Code Here


      throw new IllegalArgumentException("The requestContext contains no LuceneConfig.");
    } else if (this.luceneConfig.getIndexLocation().length() == 0) {
      throw new IllegalArgumentException("The LuceneConfig indexLocation is empty.");
    }
   
    StringAttributeMap params = requestContext.getCatalogConfiguration().getParameters();
    String param = Val.chkStr(params.getValue("lucene.useSingleSearcher"));
    this.useSingleSearcher = param.equalsIgnoreCase("true");
    param = Val.chkStr(params.getValue("lucene.useSingleWriter"));
    this.useSingleWriter = param.equalsIgnoreCase("true");
    param = Val.chkStr(params.getValue("lucene.useLocalWriter"));
    this.useLocalWriter = !param.equalsIgnoreCase("false");
    param = Val.chkStr(params.getValue("lucene.useRemoteWriter"));
    this.useRemoteWriter = param.equalsIgnoreCase("true");
    this.remoteWriterUrl = Val.chkStr(params.getValue("lucene.remoteWriterUrl"));

 
    // check for a use remote writer override
    Boolean bUseRemoteWriter = (Boolean)requestContext.getObjectMap().get("lucene.useRemoteWriter");
    if (bUseRemoteWriter != null) {
View Full Code Here

   * flags to carry over
   */
  private long flags;

  public ArcGISInfo getSource() {
    StringAttributeMap attrs = getAttributeMap();
    return new ArcGISInfo(
            attrs.getValue("ags-src-restUrl"),
            attrs.getValue("ags-src-soapUrl"),
            attrs.getValue("ags-src-userName"),
            attrs.getValue("ags-src-userPassword"));
  }
View Full Code Here

   */
  public static DcatCache getInstance() {
    if (instance==null) {
      ApplicationContext appCtx = ApplicationContext.getInstance();
      ApplicationConfiguration appCfg = appCtx.getConfiguration();
      StringAttributeMap parameters = appCfg.getCatalogConfiguration().getParameters();
      String dcatCachePath = Val.chkStr(parameters.getValue("dcat.cache.path"),getDefaultDCATPath());
      File root = new File(dcatCachePath);
     
      instance = new DcatCache(root);
    }
    return instance;
View Full Code Here

  /**
   * Fired when the servlet context is starting up.
   * @param context the application context
   */
  public static synchronized void onContextInit(ApplicationContext context) {
    StringAttributeMap params = context.getConfiguration().getCatalogConfiguration().getParameters();
    String param = Val.chkStr(params.getValue("lucene.useLocalWriter"));
    boolean bUseLocalWriter = !param.equalsIgnoreCase("false");
   
    if (bUseLocalWriter) {
      RequestContext reqCtx = null;
      try {
View Full Code Here

    PreparedStatement st = null;
    PreparedStatement stCol = null;
    try {
     
      // determine if the XML should always be stored within the index
      StringAttributeMap params  = this.getRequestContext().getCatalogConfiguration().getParameters();
      String s = Val.chkStr(params.getValue("lucene.alwaysStoreXmlInIndex"));
      boolean alwaysStoreXmlInIndex = !s.equalsIgnoreCase("false");
     
      // determine if collections are being used
      List<String[]> collections = null;
      CollectionDao colDao = new CollectionDao(this.getRequestContext());
View Full Code Here

  /**
   * Gets destination.
   * @return destination
   */
  public AgpDestination getDestination() {
    StringAttributeMap attrs = getAttributeMap();
   
    AgpDestination destination = new AgpDestination();
    AgpConnection con2 = new AgpConnection();
    HostContextPair pair = HostContextPair.makeHostContextPair(getDestinationHost());
    con2.setHost(pair.getHost());
    con2.setWebContext(pair.getContext());
    con2.setTokenCriteria(new AgpTokenCriteria());
    con2.getTokenCriteria().setCredentials(new AgpCredentials(
            attrs.getValue("ags-dest-u"), attrs.getValue("ags-dest-p")));
    con2.getTokenCriteria().setReferer(getReferrer());
    destination.setConnection(con2);
    destination.setDestinationOwner(attrs.getValue("ags-dest-o"));
    destination.setDestinationFolderID(attrs.getValue("ags-dest-f"));

    return destination;
  }
View Full Code Here

  /**
   * Gets host URL.
   * @return host URL
   */
  public String getHostUrl() {
    StringAttributeMap attrs = getAttributeMap();
    return getSourceHost() + "?user=" +attrs.getValue("ags-src-userName") +
            "&dest=http://" + getDestinationHost() + "/" + attrs.getValue("agp-dest-o"+ "/" + attrs.getValue("agp-dest-f") + "&destuser=" + attrs.getValue("agp-dest-u");
  }
View Full Code Here

    MessageBroker msgBroker = new MessageBroker();
    msgBroker.setBundleBaseName(MessageBroker.DEFAULT_BUNDLE_BASE_NAME);
   
    String baseContextPath = Val.chkStr(RequestContext.resolveBaseContextPath(null));
    if (baseContextPath.isEmpty()) {
      StringAttributeMap params = ApplicationContext.getInstance().getConfiguration().getCatalogConfiguration().getParameters();
      baseContextPath = Val.chkStr(params.getValue("reverseProxy.baseContextPath"));;
    }
   
    FeedLinkBuilder linkBuilder = new FeedLinkBuilder(context, baseContextPath, msgBroker);
   
    DcatCache cache = DcatCache.getInstance();
View Full Code Here

   * Gets all the attributes.
   * @return attributes as attribute map
   */
  @Override
  public StringAttributeMap getAttributeMap() {
    StringAttributeMap properties = new StringAttributeMap();
    properties.set("atomInfoProcessorClassName", getAtomType());
    return properties;
  }
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.