Examples of load()


Examples of org.apache.solr.core.CoreContainer.load()

    static final String SOLRCONFIG_PATH = "target/test-classes/solr/solr.xml";

    public static SolrServer createSolrServer() {
        CoreContainer coreContainer = new CoreContainer(SOLR_HOME_PATH);
        try {
            coreContainer.load(SOLR_HOME_PATH, new File(SOLRCONFIG_PATH));
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }
        return new EmbeddedSolrServer(coreContainer, "oak");
    }
View Full Code Here

Examples of org.apache.solr.core.SolrResourceLoader.load()

      Map<String, QueryConverter> queryConverters = new HashMap<String, QueryConverter>();
      NamedListPluginLoader<QueryConverter> loader =
              new NamedListPluginLoader<QueryConverter>("[solrconfig.xml] " + xpath, queryConverters);

      loader.load(solrConfig.getResourceLoader(), nodes);

      //ensure that there is at least one query converter defined
      if (queryConverters.size() == 0) {
        LOG.warning("No queryConverter defined, using default converter");
        queryConverters.put("queryConverter", new SpellingQueryConverter());
View Full Code Here

Examples of org.apache.sqoop.job.etl.Loader.load()

        // Create loader context
        LoaderContext loaderContext = new LoaderContext(subContext, reader, schema);

        LOG.info("Running loader class " + loaderName);
        loader.load(loaderContext, configConnection, configJob);
        LOG.info("Loader has finished");
      } catch (Throwable t) {
        readerFinished = true;
        LOG.error("Error while loading data out of MR job.", t);
        // Release so that the writer can tell the framework something went
View Full Code Here

Examples of org.apache.stanbol.commons.solr.managed.IndexMetadata.load()

                    File configFile = new File(uninstalledConfigDir, file);
                    IndexMetadata props = new IndexMetadata();
                    InputStream is = null;
                    try {
                        is = new FileInputStream(configFile);
                        props.load(is);
                        //validate Index-Name and Server-Name properties!
                        if(!indexName.equals(props.getIndexName())){
                            throw new IOException("The IndexName '"+props.getIndexName()+
                                "within the IndexConfig file does not correspond to the file name '"+
                                file+"'!");
View Full Code Here

Examples of org.apache.stratum.component.ComponentLoader.load()

        }

        try
        {
            ComponentLoader cl = new ComponentLoader(loaderConf);
            components = cl.load();
            setInit(true);
        }
        catch (Exception e)
        {
            log.error("Component Service failed: ", e);
View Full Code Here

Examples of org.apache.tapestry.util.text.LocalizedProperties.load()

        if (str != null) {
          displayNamesManual.load(str, "UTF-8");
        }
        str = classLoader.getResourceAsStream(OVERRIDE_LOCALE_NATIVE_DISPLAY_NAMES);
        if (str != null) {
          displayNamesOverride.load(str, "UTF-8");
        }
      } catch (UnsupportedEncodingException e) {
        // UTF-8 should always be defined
        logger.log(TreeLogger.ERROR, "UTF-8 encoding is not defined", e);
        throw new UnableToCompleteException();
View Full Code Here

Examples of org.apache.tapestry.util.text.LocalizedPropertiesLoader.load()

  //
  ////////////////////////////////////////////////////////////////////////////
  public Map<String, String> load(InputStream is, String charset) throws Exception {
    LocalizedPropertiesLoader loader = new LocalizedPropertiesLoader(is, "UTF-8");
    Map<String, String> map = new HashMap<String, String>();
    loader.load(map);
    return map;
  }

  public void save(OutputStream out, String charset, Map<String, String> map, String comments)
      throws Exception {
View Full Code Here

Examples of org.apache.tomcat.util.modeler.modules.MbeansSource.load()

            File mbeansF=new File( mbeansFile );
            mbeansMB.setSource(mbeansF);
           
            Registry.getRegistry(null, null).registerComponent
                (mbeansMB, domain + ":type=MbeansFile", null);
            mbeansMB.load();
            mbeansMB.init();
            mbeansMB.setRegistry(Registry.getRegistry(null, null));
            mbeans=mbeansMB.getMBeans();
           
        } catch( Throwable t ) {
View Full Code Here

Examples of org.apache.tuscany.implementation.spring.xml.SpringXMLComponentTypeLoader.load()

      SpringXMLComponentTypeLoader springLoader =
        new SpringXMLComponentTypeLoader( assemblyFactory, interfaceIntrospector,
                          javaFactory, policyFactory );
      try {
        // Load the Spring Implementation information from its application context file...
          springLoader.load( springImplementation );
      } catch ( ContributionReadException e ) {
        throw new ContributionResolveException( e );
      }
     
        ComponentType ct = springImplementation.getComponentType();
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.service.impl.ContributionMetadataLoaderImpl.load()

        ContributionFactory factory = new ContributionFactoryImpl();
        ContributionMetadataLoaderImpl loader =
            new ContributionMetadataLoaderImpl(new DefaultAssemblyFactory(), factory);
        Contribution contribution = factory.createContribution();
        contribution.setModelResolver(new ModelResolverImpl(getClass().getClassLoader()));
        loader.load(contribution, reader);
        assertNotNull(contribution);
        assertEquals(1, contribution.getImports().size());
        assertEquals(1, contribution.getExports().size());
        assertEquals(2, contribution.getDeployables().size());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.