Package jeeves.server

Examples of jeeves.server.ServiceConfig


              request.addContent(new Element(Geonet.SearchResult.BUILD_SUMMARY).setText("false"));
        GeonetContext gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME);
        SearchManager searchMan = gc.getBean(SearchManager.class);
        try {
          searcher = searchMan.newSearcher(SearchManager.LUCENE, Geonet.File.SEARCH_LUCENE);
          ServiceConfig sc = new ServiceConfig();
          ((LuceneSearcher)searcher).search(context, request, sc);
        } catch (Exception e) {
          e.printStackTrace();
        }
      } else {
View Full Code Here


            return "";
        }

        final ServiceContext serviceContext = ServiceContext.get();
        if (serviceContext != null) {
            ServiceConfig config = serviceContext.getBean(ServiceConfig.class);
            if (config != null) {
                String value = config.getValue(key);
                if (value != null) {
                    return value;
                } else {
                    return "";
                }
View Full Code Here

    GeonetContext gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME);

    context.info("Creating searcher");

    Element       params = buildParams();
    ServiceConfig config = new ServiceConfig();

    SearchManager searchMan = gc.getBean(SearchManager.class);
    MetaSearcher  searcher  = searchMan.newSearcher(SearchManager.LUCENE, Geonet.File.SEARCH_LUCENE);

    searcher.search(context, params, config);
View Full Code Here

                       List<String> categories = query.getCollections();
                       for (String category : categories) {
                           if (!category.equals("geonetwork") && !category.equals("Default")) request.addContent(new Element("category").setText(category));
                       }

                       ServiceConfig config = new ServiceConfig();

                       // perform the search and save search results

                       metasearcher.search(this.srvxtx, request, config);
View Full Code Here

                       int to = startingFragment + count - 1;

                       Element request = new Element("request");
                       request.addContent(new Element("from").setText(from + ""));
                       request.addContent(new Element("to").setText(to + ""));
                       ServiceConfig config = new ServiceConfig();

                   if(Log.isDebugEnabled(Geonet.Z3950_SERVER))
                       Log.debug(Geonet.Z3950_SERVER, "Search request:\n"
                                       + Xml.getString(request));
                       // get result set
View Full Code Here

    private static final SearchSuggestion searchSuggestionService = new SearchSuggestion();
    private ServiceContext context;

    @BeforeClass
    public static void initService() throws Exception {
        searchSuggestionService.init("", new ServiceConfig(Lists.newArrayList(
                createServiceConfigParam(SearchSuggestion.CONFIG_PARAM_DEFAULT_SEARCH_FIELD, "any"),
                createServiceConfigParam(SearchSuggestion.CONFIG_PARAM_MAX_NUMBER_OF_TERMS, "10000000"),
                createServiceConfigParam(SearchSuggestion.CONFIG_PARAM_THRESHOLD, "1000")
        )));
View Full Code Here

        }

    // --- Search remote node
    MetaSearcher s = searchMan.newSearcher(SearchManager.Z3950, Geonet.File.SEARCH_Z3950_CLIENT);

    ServiceConfig config = new ServiceConfig();

    Element request = new Element("request");

    // --- Z39.50 servers from harvest params
    for (String id : params.getRepositories()) {
View Full Code Here

    /**
     * Load catalogue properties.
     */
    private void loadCatalogueInfo(final GeonetContext gc) {
      ServiceConfig sc = gc.getBean(ServiceConfig.class);
      String[] props = {Geonet.Config.DATA_DIR, Geonet.Config.CODELIST_DIR, Geonet.Config.CONFIG_DIR,
          Geonet.Config.SCHEMAPLUGINS_DIR, Geonet.Config.SUBVERSION_PATH, Geonet.Config.RESOURCES_DIR};
      for (String prop : props) {
        catProperties.put("data." + prop, sc.getValue(prop));
    }
    }
View Full Code Here

  public Element exec(Element params, ServiceContext context)
      throws Exception {
    String status = "true";
    GeonetContext gc = (GeonetContext) context
        .getHandlerContext(Geonet.CONTEXT_NAME);
    ServiceConfig handlerConfig = gc.getBean(ServiceConfig.class);
    String luceneConfigXmlFile = handlerConfig
        .getMandatoryValue(Geonet.Config.LUCENE_CONFIG);

    LuceneConfig lc = context.getBean(LuceneConfig.class);
        lc.configure(luceneConfigXmlFile);
View Full Code Here

    String path    = context.getAppPath();
        if(context.isDebugEnabled())
            context.debug("path= " + path);

    GeonetContext  gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME);
    ServiceConfig configHandler = gc.getBean(ServiceConfig.class);
    String licenseDir = configHandler.getValue(Geonet.Config.LICENSE_DIR);
        if(context.isDebugEnabled())
            context.debug("licenseDir= " + licenseDir);
    if (licenseDir == null) return null;

    File directory = new File(licenseDir);
View Full Code Here

TOP

Related Classes of jeeves.server.ServiceConfig

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.