GNDMS 0.6.0
RESTful verison of GNDMS
Public Member Functions | Private Attributes

de.zib.gndms.model.dspace.Subspace Class Reference

Instances represent concrete subspaces in the local DSpace. More...

Inheritance diagram for de.zib.gndms.model.dspace.Subspace:
de.zib.gndms.model.common.GridResource de.zib.gndms.model.common.GridEntity de.zib.gndms.model.common.GridResourceItf de.zib.gndms.model.ModelEntity de.zib.gndms.model.ModelObject

List of all members.

Public Member Functions

void setPath (final String path)
 Sets the path of this subspace.
String getPathForSlice (final Slice sl)
 Returns the absolute path to a slice.
String getGsiFtpPathForSlice (final Slice sl)
 Returns the gsi ftp path to a slice.
long getAvailableSize ()
 Returns the available size of this subspace.
long getTotalSize ()
 Returns the total size of this subspace.
String getPath ()
 Returns the absolute path of this subspace.
String getGsiFtpPath ()
 Returns the gsi ftp path of this subspace.
void setAvailableSize (final long availableSize)
 Sets the available size of this subspace.
void setTotalSize (final long totalSize)
 Sets the total size of this subspace.
void setGsiFtpPath (final String gsiFtpPath)
 Sets the gsi ftp path for this subspace.
boolean isVisibleToPublic ()
 Returns the visibility of this subspace.
void setVisibleToPublic (final boolean visibleToPublic)
 Sets the visibility of this subspace.
Set< SliceKindgetCreatableSliceKinds ()
 Returns the slice kinds of this subspace.
void setCreatableSliceKinds (final Set< SliceKind > creatableSliceKinds)
 Sets the slice kinds of this subspace.

Private Attributes

long availableSize
 The still available size in this subspace.
long totalSize
 The total size of the subspace.
String path
 The absolute path of this subspace.
String gsiFtpPath
 The gsiftp path of this subspace.
boolean visibleToPublic
 If this subspace is publicly visible.
Set< SliceKindcreatableSliceKinds = new HashSet<SliceKind>()
 The set of slice kinds which are allowed in this subspace.

Detailed Description

Instances represent concrete subspaces in the local DSpace.


Member Function Documentation

long de.zib.gndms.model.dspace.Subspace.getAvailableSize ( )

Returns the available size of this subspace.

Returns:
The available size.
                                   {
        return availableSize;
    }
Set<SliceKind> de.zib.gndms.model.dspace.Subspace.getCreatableSliceKinds ( )

Returns the slice kinds of this subspace.

Returns:
The slice kinds.
                                                   {
        return creatableSliceKinds;
    }
String de.zib.gndms.model.dspace.Subspace.getGsiFtpPath ( )

Returns the gsi ftp path of this subspace.

Returns:
The gsi ftp path.
                                  {
        return gsiFtpPath;
    }
String de.zib.gndms.model.dspace.Subspace.getGsiFtpPathForSlice ( final Slice  sl)

Returns the gsi ftp path to a slice.

Parameters:
slThe slice.
Returns:
The gsi ftp path.
                                                         {
        return getGsiFtpPath() + "/" + sl.getKind( ).getSliceDirectory() + "/" + sl.getDirectoryId( );
    }
String de.zib.gndms.model.dspace.Subspace.getPath ( )

Returns the absolute path of this subspace.

Returns:
The path.
                            {
        return path;
    }
String de.zib.gndms.model.dspace.Subspace.getPathForSlice ( final Slice  sl)

Returns the absolute path to a slice.

Parameters:
slThe slice.
Returns:
The path.
                                                   {
        return getPath() + File.separator + sl.getKind( ).getSliceDirectory() + File.separator + sl.getDirectoryId();
    }
long de.zib.gndms.model.dspace.Subspace.getTotalSize ( )

Returns the total size of this subspace.

Returns:
The total size
                               {
        return totalSize;
    }
boolean de.zib.gndms.model.dspace.Subspace.isVisibleToPublic ( )

Returns the visibility of this subspace.

Returns:
The visibility.
                                       {
        return visibleToPublic;
    }
void de.zib.gndms.model.dspace.Subspace.setAvailableSize ( final long  availableSize)

Sets the available size of this subspace.

Parameters:
availableSizeThe size to set.
void de.zib.gndms.model.dspace.Subspace.setCreatableSliceKinds ( final Set< SliceKind creatableSliceKinds)

Sets the slice kinds of this subspace.

Parameters:
creatableSliceKindsThe slice kinds.
void de.zib.gndms.model.dspace.Subspace.setGsiFtpPath ( final String  gsiFtpPath)

Sets the gsi ftp path for this subspace.

Parameters:
gsiFtpPathThe path to set.
                                                       {
        this.gsiFtpPath = gsiFtpPath;
    }   
void de.zib.gndms.model.dspace.Subspace.setPath ( final String  path)

Sets the path of this subspace.

path must exist and be a valid directory with read/write access.

Parameters:
pathThe path.
Note:
The read permission will be removed from path.
                                           {
        // TODO this test seemed to be useful?
        /*
        File f = new File( pth );

        if( ! ( f.exists( ) && f.isDirectory( ) ) )
            throw new IllegalStateException( pth+" does not exists or isn't a directory" );

        if( ! f.canWrite( ) )
            throw new IllegalStateException( pth+" is not writable" );
            */

//        if( pth == null )
//            throw new IllegalStateException( "path must not be null" );
        this.path = path;
    }
void de.zib.gndms.model.dspace.Subspace.setTotalSize ( final long  totalSize)

Sets the total size of this subspace.

Parameters:
totalSizeThe size to set.
                                                   {
        this.totalSize = totalSize;
    }
void de.zib.gndms.model.dspace.Subspace.setVisibleToPublic ( final boolean  visibleToPublic)

Sets the visibility of this subspace.

Parameters:
visibleToPublicThe visibility.

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