Package org.apache.stanbol.commons.namespaceprefix

Examples of org.apache.stanbol.commons.namespaceprefix.NamespacePrefixService


        IndexReference solrServerRef = IndexReference.parse(config.getSolrServerLocation());
        solrServerProvider = StandaloneEmbeddedSolrServerProvider.getInstance();
        SolrServer server = solrServerProvider.getSolrServer(solrServerRef,
            config.isAllowInitialisation() ? config.getIndexConfigurationName() : null);
        //Optional support for the nsPrefix service
        final NamespacePrefixService nsPrefixService;
        ServiceLoader<NamespacePrefixService> spsl = ServiceLoader.load(NamespacePrefixService.class);
        Iterator<NamespacePrefixService> it = spsl.iterator();
        if(it.hasNext()){
            nsPrefixService = it.next();
        } else {
View Full Code Here


    private boolean musicbrainzState;
   
    @Override
    public void setConfiguration(Map<String,Object> config) {
        IndexingConfig indexingConfig = (IndexingConfig)config.get(IndexingConfig.KEY_INDEXING_CONFIG);
        NamespacePrefixService nsPrefixService = indexingConfig.getNamespacePrefixService();
       
        Object value = config.get(PARAM_LINK_PROPERTY);
        if(value != null){
            linkProperty = nsPrefixService.getFullName(value.toString());
            if(linkProperty == null){
                throw new IllegalArgumentException("Unknown Namespace Prefix use in "
                    + PARAM_LINK_PROPERTY+'='+value+"!");
            }
        } else {
View Full Code Here

            }
            //Assert.assertTrue(mappingFile.isFile());
        } else {
            mappingFile = new File("testnamespaceprefix.mappings");
        }
        NamespacePrefixService service = new StanbolNamespacePrefixService(mappingFile);
        //assertMappings
        Assert.assertEquals(foaf_pf, service.getPrefix(foaf_ns));
        Assert.assertEquals(foaf_ns, service.getNamespace(foaf_pf));
       
    }
View Full Code Here

   
   
    @Override
    public void setConfiguration(Map<String,Object> config) {
        IndexingConfig indexingConfig = (IndexingConfig)config.get(IndexingConfig.KEY_INDEXING_CONFIG);
        NamespacePrefixService nsPrefixService = indexingConfig.getNamespacePrefixService();
        log.info("Configure {}",getClass().getSimpleName());
        Object value = config.get(PARAM_PROPERTY_FILTERS);
        if(value == null){
            propertyPrefixMap = Collections.emptyMap();
            propertyMap = Collections.emptyMap();
View Full Code Here

            }
            //Assert.assertTrue(mappingFile.isFile());
        } else {
            mappingFile = new File("testnamespaceprefix.mappings");
        }
        NamespacePrefixService service = new StanbolNamespacePrefixService(mappingFile);
        //assertMappings
        Assert.assertEquals(foaf_pf, service.getPrefix(foaf_ns));
        Assert.assertEquals(foaf_ns, service.getNamespace(foaf_pf));
       
    }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.commons.namespaceprefix.NamespacePrefixService

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.