GNDMS 0.6.0
RESTful verison of GNDMS
Public Member Functions | Protected Member Functions

de.zib.gndms.logic.model.dspace.SliceKindProviderImpl Class Reference

The slice kind provider which handles the available subspaces providing a mapping of slice kind ids and slice kinds. More...

Inheritance diagram for de.zib.gndms.logic.model.dspace.SliceKindProviderImpl:
de.zib.gndms.logic.model.dspace.SliceKindProvider

List of all members.

Public Member Functions

 SliceKindProviderImpl (final EntityManagerFactory emf)
boolean exists (String subspace, String sliceKind)
 Checks whether a given slice kind id exists for the subspace.
List< String > list (String subspace) throws NoSuchElementException
 Returns a list containing all existing slice kind ids for a subspace.
SliceKind get (String subspace, String sliceKind) throws NoSuchElementException
 Returns the slice kind for a given slice kind id in a subspace.
void create (final String sliceKindId, final String config)

Protected Member Functions

String getListQuery ()

Detailed Description

The slice kind provider which handles the available subspaces providing a mapping of slice kind ids and slice kinds.

Author:
Jörg Bachmann

Member Function Documentation

boolean de.zib.gndms.logic.model.dspace.SliceKindProviderImpl.exists ( String  subspace,
String  sliceKind 
)

Checks whether a given slice kind id exists for the subspace.

Parameters:
subspaceThe considered subspace.
sliceKindThe slice kind id.
Returns:
true, if this slice kind exists, otherwise false.

Implements de.zib.gndms.logic.model.dspace.SliceKindProvider.

                                                               {
        return super.exists( sliceKind );
    }
SliceKind de.zib.gndms.logic.model.dspace.SliceKindProviderImpl.get ( String  subspace,
String  sliceKind 
) throws NoSuchElementException

Returns the slice kind for a given slice kind id in a subspace.

Parameters:
subspaceThe considered subspace.
sliceKindThe requested slice kind id.
Returns:
The corresponding slice kind.
Exceptions:
NoSuchElementExceptionif the subspace does not exist.

Implements de.zib.gndms.logic.model.dspace.SliceKindProvider.

                                                                                            {
        return super.get( sliceKind );
    }
List< String > de.zib.gndms.logic.model.dspace.SliceKindProviderImpl.list ( String  subspace) throws NoSuchElementException

Returns a list containing all existing slice kind ids for a subspace.

Parameters:
subspaceThe considered subspace.
Returns:
The list.
Exceptions:
NoSuchElementExceptionif the subspace does not exist.

Implements de.zib.gndms.logic.model.dspace.SliceKindProvider.

                                                                                {
        EntityManager em = emf.createEntityManager();
        Query query = em.createNamedQuery( getListQuery() );
        query.setParameter( "idParam", subspace );
        return query.getResultList();
    }

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables