Ignore:
Timestamp:
04/04/13 14:09:29 (11 years ago)
Author:
keeloo
Message:

Corrected typos in config package. Added list initialisation to VloConfig?. Also fixed ticket 297, Access to packaged National projects mapping file. Finally, made provisions displaying the landing page in the web application.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vlo/trunk/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIData.java

    r2768 r2774  
    11package eu.clarin.cmdi.vlo.importer;
    22
     3import eu.clarin.cmdi.vlo.FacetConstants;
    34import java.util.ArrayList;
    45import java.util.Collection;
    56import java.util.List;
    6 
    77import org.apache.solr.common.SolrInputDocument;
    88import org.slf4j.Logger;
    99import org.slf4j.LoggerFactory;
    10 
    11 import eu.clarin.cmdi.vlo.FacetConstants;
    1210
    1311/**
     
    2119    private static final String DATA_RESOURCE_TYPE = "Resource";
    2220    private static final String SEARCH_SERVICE_TYPE = "SearchService";
     21    private static final String LANDING_PAGE_TYPE = "LandingPage";
    2322
    2423    /**
     
    2625     */
    2726    private String id;
     27   
    2828    /**
    2929     * The associated solr document (not send to the solr server yet)
     
    3535    private final List<Resource> dataResources = new ArrayList<Resource>();
    3636    private final List<Resource> searchResources = new ArrayList<Resource>();
     37    private final List<Resource> landingPageResources = new ArrayList<Resource>();
    3738
    3839    public SolrInputDocument getSolrDocument() {
     
    4142
    4243    /**
    43      * Sets a field in the doc to a certain value. Well, at least calls another (private) method that actually does this.
     44     * Sets a field in the doc to a certain value. Well, at least calls another
     45     * (private) method that actually does this.
    4446     * @param name
    4547     * @param value
     
    9294
    9395    /**
    94      * Processes a resource by adding it to the internal lists.
    95      * Supports metadata, data, and search service type of resources.
    96      * Emits a warning if another type of resource is encountered (not allowed according to the cmdi spec, but we try to be a tad robust).
     96     * Return a list of landing page resources
     97     */
     98    public List<Resource> getLandingPageResources() {
     99        return landingPageResources;
     100    }
     101
     102    /**
     103     * Processes a resource by adding it to the internal lists. Supports meta
     104     * data, data, search service and landing page type of resources. Emits a
     105     * warning if another type of resource is encountered (not allowed according
     106     * to the cmdi spec, but we try to be a tad robust).
     107     *
    97108     * @param resource
    98109     * @param type
     
    106117        } else if (SEARCH_SERVICE_TYPE.equals(type)){
    107118            searchResources.add(new Resource(resource,type, mimeType));
     119        } else if (LANDING_PAGE_TYPE.equals(type)){
     120            landingPageResources.add(new Resource(resource,type, mimeType));
    108121        } else {
    109             LOG.warn("Found unsupported resource it will be ignored: type=" + type + ", name=" + resource);
     122            LOG.warn("Found unsupported resource it will be ignored: type=" +
     123                    type + ", name=" + resource);
    110124        }
    111125    }
     
    118132        return id;
    119133    }
    120 
    121134}
Note: See TracChangeset for help on using the changeset viewer.