org.gcube.data.oai.tmplugin.repository
Interface Repository

All Superinterfaces:
Serializable
All Known Implementing Classes:
BaseRepository

public interface Repository
extends Serializable

A local interface to a remote OAI repository.

Author:
Fabio Simeoni

Method Summary
 String description()
          Returns the description of the repository.
 org.gcube.data.trees.data.Tree get(String id, List<Set> sets)
          Retrieves a Tree with a given identifier from one of a number of sets in the repository.
 org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> getAllIn(List<Set> sets)
          Retrieves all trees in a number of sets of the repository.
 List<Set> getSetsWith(List<String> setIds)
          Retrieve sets of the repository with given identifiers
 String name()
          Returns the name of the repository.
 Summary summary(List<Set> sets)
          Returns a Summary of a number of sets of the repository.
 String url()
          Returns the URL of the repository.
 

Method Detail

name

String name()
Returns the name of the repository.

Returns:
the name

description

String description()
Returns the description of the repository.

Returns:
the description

url

String url()
Returns the URL of the repository.

Returns:
the URL

getSetsWith

List<Set> getSetsWith(List<String> setIds)
Retrieve sets of the repository with given identifiers

Parameters:
setIds - the identifiers
Returns:
the sets

get

org.gcube.data.trees.data.Tree get(String id,
                                   List<Set> sets)
                                   throws org.gcube.data.tmf.api.exceptions.UnknownTreeException,
                                          Exception
Retrieves a Tree with a given identifier from one of a number of sets in the repository.

Parameters:
id - the identifier
sets - the sets
Returns:
the tree
Throws:
org.gcube.data.tmf.api.exceptions.UnknownTreeException - if there is no tree in the sets with the given identifier
Exception - if the operation fails for any other error

getAllIn

org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> getAllIn(List<Set> sets)
Retrieves all trees in a number of sets of the repository.

Parameters:
sets - the sets
Returns:
the trees

summary

Summary summary(List<Set> sets)
                throws Exception
Returns a Summary of a number of sets of the repository.

Parameters:
sets - the sets
Returns:
the summary
Throws:
Exception - if the summary cannot be returned


Copyright © 2013. All Rights Reserved.