/** * Constructs a config using the specified resource name and stream. * If the is stream is null, the resource loader will load the resource * by name. * @see SolrResourceLoader#openConfig * By default, this follows the normal config path directory searching rules. * @see SolrResourceLoader#openResource */ public SirenDatatypeAnalyzerConfig(final SolrResourceLoader loader, final String name, InputSource is, final Version luceneMatchVersion) { this.luceneMatchVersion = luceneMatchVersion; this.resourceName = name; this.loader = loader; try { if (is == null) { is = new InputSource(loader.openResource(name)); is.setSystemId(SystemIdResolver.createSystemIdFromResourceName(name)); } this.readConfig(is); } catch (final IOException e) { throw new RuntimeException(e); } }
builder.setEntityResolver(new SystemIdResolver(core.getResourceLoader())); } else {
if (core != null) { final ResourceLoader loader = core.getResourceLoader(); transFact.setURIResolver(new SystemIdResolver(loader).asURIResolver()); xsltSource = new StreamSource(loader.openResource(xslt), SystemIdResolver.createSystemIdFromResourceName(xslt)); } else {
/** * Constructs a config using the specified resource name and stream. * If the is stream is null, the resource loader will load the resource * by name. * @see SolrResourceLoader#openConfig * By default, this follows the normal config path directory searching rules. * @see SolrResourceLoader#openResource */ public SirenDatatypeAnalyzerConfig(final SolrResourceLoader loader, final String name, InputSource is, final Version luceneMatchVersion) { this.luceneMatchVersion = luceneMatchVersion; this.resourceName = name; this.loader = loader; try { if (is == null) { is = new InputSource(loader.openResource(name)); is.setSystemId(SystemIdResolver.createSystemIdFromResourceName(name)); } this.readConfig(is); } catch (final IOException e) { throw new RuntimeException(e); } }
} else if(dataconfigFile!=null) { is = new InputSource(core.getResourceLoader().openResource(dataconfigFile)); is.setSystemId(SystemIdResolver.createSystemIdFromResourceName(dataconfigFile)); log.info("Loading DIH Configuration: " + dataconfigFile);
SolrConfig solrConfig = new SolrConfig(loader, "solrconfig.xml", null); InputSource is = new InputSource(loader.openSchema("schema.xml")); is.setSystemId(SystemIdResolver.createSystemIdFromResourceName("schema.xml"));
SolrConfig solrConfig = new SolrConfig(loader, "solrconfig.xml", null); InputSource is = new InputSource(loader.openSchema("schema.xml")); is.setSystemId(SystemIdResolver.createSystemIdFromResourceName("schema.xml"));