org.gcube.data.figis.tmplugin.repository
Class BaseRepository

java.lang.Object
  extended by org.gcube.data.figis.tmplugin.repository.BaseRepository
All Implemented Interfaces:
Serializable, Repository

public class BaseRepository
extends Object
implements Repository

Default Repository implementation

Author:
"Valentina Marioli valentina.marioli@isti.cnr.it"
See Also:
Serialized Form

Constructor Summary
BaseRepository(Request request)
           
 
Method Summary
 String description()
          Returns the description of the repository.
 org.gcube.data.trees.data.Tree get(String id)
          Retrieves a Tree with a given identifier
 org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> getRecords()
          Retrieves all trees
 String name()
          Returns the name of the repository.
 Summary summary()
          Returns a Summary of a number of sets of the repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseRepository

public BaseRepository(Request request)
               throws Exception
Throws:
Exception
Method Detail

name

public String name()
Returns the name of the repository.

Specified by:
name in interface Repository
Returns:
the name

description

public String description()
Returns the description of the repository.

Specified by:
description in interface Repository
Returns:
the description

get

public org.gcube.data.trees.data.Tree get(String id)
                                   throws org.gcube.data.tmf.api.exceptions.UnknownTreeException,
                                          Exception
Retrieves a Tree with a given identifier

Specified by:
get in interface Repository
Parameters:
id - the identifier
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

getRecords

public org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> getRecords()
                                                                         throws org.gcube.data.tmf.api.exceptions.UnknownTreeException,
                                                                                Exception
Description copied from interface: Repository
Retrieves all trees

Specified by:
getRecords in interface Repository
Returns:
the trees
Throws:
org.gcube.data.tmf.api.exceptions.UnknownTreeException
Exception

summary

public Summary summary()
                throws Exception
Returns a Summary of a number of sets of the repository.

Specified by:
summary in interface Repository
Returns:
the summary
Throws:
Exception - if the summary cannot be returned


Copyright © 2013. All Rights Reserved.