Ignore:
Timestamp:
11/19/15 15:44:00 (9 years ago)
Author:
Oliver Schonefeld
Message:
  • some FCS 2.0 stuff (incomplete!)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • FCSSimpleEndpoint/trunk/src/main/java/eu/clarin/sru/server/fcs/ResourceInfo.java

    r5546 r6830  
    1919    private final List<String> languages;
    2020    private final List<DataView> availableDataViews;
     21    private final List<Layer> availableLayers;
    2122    private final List<ResourceInfo> subResources;
    2223
     
    4243     * @param availableDataViews
    4344     *            the list of available data views for this resource
     45     * @param availableLayers
     46     *            the list if layers available for Advanced Search or
     47     *            <code>null</code> if not applicable
    4448     * @param subResources
    4549     *            a list of resource sub-ordinate to this resource or
     
    4953            Map<String, String> description, String landingPageURI,
    5054            List<String> languages, List<DataView> availableDataViews,
     55            List<Layer> availableLayers,
    5156            List<ResourceInfo> subResources) {
    5257        if (pid == null) {
     
    8388                Collections.unmodifiableList(availableDataViews);
    8489
     90        if ((availableLayers != null) && !availableDataViews.isEmpty()) {
     91            this.availableLayers =
     92                    Collections.unmodifiableList(availableLayers);
     93        } else {
     94            this.availableLayers = null;
     95        }
     96
    8597        if ((subResources != null) && !subResources.isEmpty()) {
    8698            this.subResources = Collections.unmodifiableList(subResources);
     
    182194
    183195    /**
     196     * Get the list of data views that are available for this resource.
     197     *
     198     * @return the list of data views
     199     */
     200    public List<DataView> getAvailableDataViews() {
     201        return availableDataViews;
     202    }
     203
     204
     205    /**
     206     * Get the list of layers that are available in Advanced Search for this
     207     * resource.
     208     *
     209     * @return the list of layers or <code>null</code>
     210     */
     211    public List<Layer> getAvailableLayers() {
     212        return availableLayers;
     213    }
     214
     215
     216    /**
     217     * Check if any layers are available for Advanced Search
     218     *
     219     * @return <code>true</code> if any layer for Advanced Search is available,
     220     *         <code>false</code> otherwise
     221     */
     222    public boolean hasAvailableLayers() {
     223        return (availableLayers != null);
     224    }
     225
     226
     227    /**
    184228     * Get the direct sub-ordinate resources of this resource.
    185229     *
     
    191235    }
    192236
    193 
    194         public List<DataView> getAvailableDataViews() {
    195                 return availableDataViews;
    196         }
    197 
    198237} // class ResourceInfo
Note: See TracChangeset for help on using the changeset viewer.