de.fzj.unicore.uas.client
Class GridFileFilter

java.lang.Object
  extended by de.fzj.unicore.uas.client.GridFileFilter
All Implemented Interfaces:
IGridFileFilter

public class GridFileFilter
extends java.lang.Object
implements IGridFileFilter

Provides filter criteria for GridFileTypes

Author:
Christian Hohmann

Field Summary
static int FILES_AND_FOLDERS
           
static int ONLY_FILES
           
static int ONLY_FOLDERS
           
 
Constructor Summary
GridFileFilter(java.lang.String criteria)
          criteria needs to be relative to search root
 
Method Summary
 boolean browseSubfolder(org.unigrids.services.atomic.types.GridFileType file)
          return true if matches are possible for childs of the given file element
 java.lang.String getInitCriteria()
           
 boolean match(org.unigrids.services.atomic.types.GridFileType file)
          return true if file object matches the set filter criteria
 void setCriteria(java.lang.String criteria)
          translates the given criteria into a regular expression and sets it for this filter
 boolean setFileFolderCriteria(int i)
           
static java.lang.String translateCriteria(java.lang.String criteria)
          translates the given criteria into a regular expression representing criteria is static to allow flexible use of this method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILES_AND_FOLDERS

public static final int FILES_AND_FOLDERS
See Also:
Constant Field Values

ONLY_FILES

public static final int ONLY_FILES
See Also:
Constant Field Values

ONLY_FOLDERS

public static final int ONLY_FOLDERS
See Also:
Constant Field Values
Constructor Detail

GridFileFilter

public GridFileFilter(java.lang.String criteria)
criteria needs to be relative to search root

Method Detail

translateCriteria

public static java.lang.String translateCriteria(java.lang.String criteria)
translates the given criteria into a regular expression representing criteria is static to allow flexible use of this method

Parameters:
criteria -
Returns:
the translated criteria

setCriteria

public void setCriteria(java.lang.String criteria)
translates the given criteria into a regular expression and sets it for this filter

Specified by:
setCriteria in interface IGridFileFilter

setFileFolderCriteria

public boolean setFileFolderCriteria(int i)

match

public boolean match(org.unigrids.services.atomic.types.GridFileType file)
Description copied from interface: IGridFileFilter
return true if file object matches the set filter criteria

Specified by:
match in interface IGridFileFilter

browseSubfolder

public boolean browseSubfolder(org.unigrids.services.atomic.types.GridFileType file)
Description copied from interface: IGridFileFilter
return true if matches are possible for childs of the given file element

Specified by:
browseSubfolder in interface IGridFileFilter

getInitCriteria

public java.lang.String getInitCriteria()
Specified by:
getInitCriteria in interface IGridFileFilter
Returns:
the String set by setCriteria(String)


Copyright © 2006-2010 Research Center Juelich. All Rights Reserved.