/*
 * Copyright (c) 2016, Bart Hanssens <bart.hanssens@fedict.be>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * * Redistributions of source code must retain the above copyright notice, this
 *   list of conditions and the following disclaimer.
 * * Redistributions in binary form must reproduce the above copyright notice,
 *   this list of conditions and the following disclaimer in the documentation
 *   and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
package be.fedict.dcat.scrapers;

import java.io.File;
import java.net.URL;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * CKAN Brussels Region.
 * 
 * @author Bart Hanssens <bart.hanssens@fedict.be>
 */
public class CkanBrussels extends CkanRDF {
    private final Logger logger = LoggerFactory.getLogger(CkanBrussels.class);

    /**
     * Constructor
     * 
     * @param caching DB cache file
     * @param storage SDB file to be used as triple store backend
     * @param base base URL
     */
    public CkanBrussels(File caching, File storage, URL base) {
        super(caching, storage, base);
        setName("brussels");
   }    
}

@@ -1459,326 +1459,1440 @@
 ort 
-java.io.File;%0D%0Aimport java.net.URL;%0D%0A%0D%0Aimport org.slf4j.Logger;%0D%0Aimport org.slf4j.LoggerFactory;%0D%0A%0D%0A/**%0D%0A * CKAN Brussels Region.%0D%0A * %0D%0A * @author Bart Hanssens %3Cbart.hanssens@fedict.be%3E%0D%0A */%0D%0Apublic class CkanBrussels extends CkanRDF %7B%0D%0A    private final Logger logger = LoggerFactory.getLogger(CkanBrussels.class);%0D%0A
+be.fedict.dcat.helpers.Cache;%0D%0Aimport be.fedict.dcat.helpers.Page;%0D%0Aimport be.fedict.dcat.helpers.Storage;%0D%0Aimport java.io.File;%0D%0Aimport java.net.MalformedURLException;%0D%0Aimport java.net.URL;%0D%0Aimport java.util.List;%0D%0Aimport java.util.Map;%0D%0Aimport org.eclipse.rdf4j.repository.RepositoryException;%0D%0A%0D%0Aimport org.slf4j.Logger;%0D%0Aimport org.slf4j.LoggerFactory;%0D%0A%0D%0A/**%0D%0A * CKAN Brussels Region.%0D%0A * %0D%0A * @author Bart Hanssens %3Cbart.hanssens@fedict.be%3E%0D%0A */%0D%0Apublic class CkanBrussels extends CkanRDF %7B%0D%0A    private final Logger logger = LoggerFactory.getLogger(CkanBrussels.class);%0D%0A%0D%0A%09    /**%0D%0A     * Generate DCAT.%0D%0A     * %0D%0A     * @param cache%0D%0A     * @param store RDF store%0D%0A     * @throws RepositoryException%0D%0A     * @throws MalformedURLException %0D%0A     */%0D%0A    @Override%0D%0A    public void generateDcat(Cache cache, Storage store) %0D%0A                            throws RepositoryException, MalformedURLException %7B%0D%0A        logger.info(%22Generate DCAT%22);%0D%0A        %0D%0A        /* Get the list of all datasets */%0D%0A        List%3CURL%3E urls = cache.retrieveURLList();%0D%0A        for (URL u : urls) %7B%0D%0A%09%09%09/* Remove dummy sets used by BXL for special purposes */%0D%0A%09%09%09if (u.toString().endsWith(%22-harvester%22)) %7B%0D%0A%09%09%09%09logger.info(%22Remove dummy dataset %7B%7D%22, u);%0D%0A%09%09%09%09urls.remove(u);%0D%0A%09%09%09%7D else %7B%0D%0A%09%09%09%09Map%3CString, Page%3E page = cache.retrievePage(u);%0D%0A%09%09%09%09generateDataset(store, null, page);%0D%0A%09%09%09%7D%0D%0A        %7D%0D%0A        generateCatalog(store);%0D%0A    %7D%0D%0A%09%0D%0A%09
 %0D%0A  

Remove dummy harvester from Brussels datasets Signed-off-by:Bart Hanssens <bart.hanssens@fedict.be>