|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.iseries.comm.filters.ISeriesAbstractFilterString
com.ibm.etools.iseries.comm.filters.ISeriesIFSFilterString
public class ISeriesIFSFilterString
A class representing an AS/400 Integrated File System (IFS) filter string.
This is a path and name pattern for listing contents of an IFS folder.
Getting a list requires a fully qualified path, relative to the root folder, and
a generic file name pattern for subsetting the contents of the folder. It is
also possible to explicitly exclude subfolders or files from the returned list.
All this information can be specified by calling the setPath(String)
,
and setFile(String)
methods, and the setShowSubDirs(boolean)
and setShowFiles(boolean)
methods.
Alternatively, it can be set by passing in a filter string in the constructor.
Filter strings for IFS lists are of the form:
/path/file -nf -ns
where path is a forward-slash separated qualified folder name, and file is a
generic name pattern used to subset the returned list of contents of the folder.
The -nf and -ns switches are optional and if specified exclude files and
subfolders from the returned list, respectively. They cannot be specified together,
or you will get an empty list back!
Note the terms folder and directory are used interchangeably in this documentation.
To get the actual filter string from objects of this class, just call toString()
.
Objects of this class are used in the ISeriesListIFS
class for returning a list of information about each IFS folder or file meeting the filter's criteria.
ISeriesListIFS
Field Summary | |
---|---|
static String |
Copyright
|
static String |
PATH_SEP
|
static String |
SWITCH_NOFILES
|
static String |
SWITCH_NOSUBDIRS
|
Fields inherited from class com.ibm.etools.iseries.comm.filters.ISeriesAbstractFilterString |
---|
QUOTE, WILDCARD |
Constructor Summary | |
---|---|
ISeriesIFSFilterString()
Constructor to use when there is no existing filter string. |
|
ISeriesIFSFilterString(String input)
Constructor to use when filter string already exists. |
|
ISeriesIFSFilterString(String rootPath,
String input)
Constructor to use when you have a path and relative filter. |
Method Summary | |
---|---|
String |
getFile()
Return the file part of the filter. |
String |
getPath()
Return the path part of the filter. |
boolean |
getShowFiles()
Return files in the list of contents? Specify true or false here to set it. |
boolean |
getShowSubDirs()
Subdirs allowed? |
boolean |
isGeneric()
Returns true if current filter represents a generic name or vs a scalar name. |
boolean |
isMultiGeneric()
Returns true if current filter represents a generic name that has more than one generic name part. |
protected void |
parse(String input)
Private method to parse filter string. |
void |
setFile(String obj)
Set the file part of the filter. |
void |
setPath(String path)
Set the path part of the filter. |
void |
setShowFiles(boolean set)
Allow files? |
void |
setShowSubDirs(boolean set)
Return sub folders in the list of contents? Specify true or false here to set it. |
String |
toString()
Convert this filter into a filter string. |
String |
toStringNoOptions()
Convert this filter into a filter string, but do not return the -nf or -ns switches. |
Methods inherited from class com.ibm.etools.iseries.comm.filters.ISeriesAbstractFilterString |
---|
addQuotes, clone, countHostOccurrencesOf, countOccurrencesOf, createFilterStringObject, equals, hashCode, hostIndexOf, hostIndexOf, isGenericLibraryName, isGenericName, isQuoted, stripQuotes, verifyGenericName, verifyGenericNameAdvanced, verifyGenericNameAdvancedQuoted, verifyGenericNameQuoted |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String Copyright
public static final String PATH_SEP
public static final String SWITCH_NOSUBDIRS
public static final String SWITCH_NOFILES
Constructor Detail |
---|
public ISeriesIFSFilterString()
/*
, which
means list all folders and files in the root directory.
To change any of the default values, after instantiation call:
setPath(String)
to set the path name.
setFile(String)
to set the file name filter. This can be a simple or generic
name.
setShowSubDirs(boolean)
to explicitly include/exclude subfolders from
the returned list. The default is true, include.
setShowFiles(boolean)
to explicitly include/exclude files from
the returned list. The default is true, include.
public ISeriesIFSFilterString(String input)
/path/file -nf -ns
where path is a forward-slash separated qualified folder name, and file is a
generic name pattern used to subset the returned list of contents of the folder.
The -nf and -ns switches are optional and if specified exclude files and
subfolders from the returned list, respectively. They cannot be specified together,
or you will get an empty list back!
To get the actual filter string from object of this class, just call toString()
.
public ISeriesIFSFilterString(String rootPath, String input)
Method Detail |
---|
protected void parse(String input)
public String getPath()
public String getFile()
public void setPath(String path)
public void setFile(String obj)
public void setShowSubDirs(boolean set)
public boolean getShowSubDirs()
public boolean getShowFiles()
public void setShowFiles(boolean set)
public String toString()
/path/file -nf -ns
where path is a forward-slash separated qualified folder name, and file is a
generic name pattern used to subset the returned list of contents of the folder.
The -nf and -ns switches are optional and if specified exclude files and
subfolders from the returned list, respectively. They cannot be specified together,
or you will get an empty list back!
toString
in class ISeriesAbstractFilterString
public String toStringNoOptions()
public boolean isGeneric()
isGeneric
in class ISeriesAbstractFilterString
public boolean isMultiGeneric()
isMultiGeneric
in class ISeriesAbstractFilterString
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |