|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fatwire.agent.Query
public class Query
Query class.
Queries are used to search for items in repositories. The following example retrieves the first level of folders inside a repository (assume session is a valid reference to IProviderSession).IRepository repository = session.GetRepositoryByID("1"); QueryPtr query = new Query(0, QueryItemType.Folders); Listitems = repository.getTopFolder().search(query);
Constructor Summary | |
---|---|
Query()
Constructor. |
|
Query(int depth,
QueryItemType type)
Constructor. |
|
Query(java.lang.String keywords,
boolean allwords,
int depth,
QueryItemType type)
Constructs a query to search items by keywords of certain type from certain depth. |
Method Summary | |
---|---|
void |
addAssetType(java.lang.String assettypeid,
java.util.List<java.lang.String> descriptors)
Adds a new asset type with all descriptors into this query. |
java.util.List<java.lang.String> |
getAssetTypes()
Retrieves the list of asset type in this Query object. |
int |
getDepth()
Gets query search depth: 0 means just the upper level of items, 1 means two levels and so on. |
java.util.List<java.lang.String> |
getDescriptors(java.lang.String assettypeid)
Retrieves the list of descriptors belonging to the asset type specified. |
QueryItemType |
getItemType()
Item type to search for: asset, folders or both. |
java.lang.String |
getKeywords()
Search words. |
boolean |
isAllwords()
Whether to search for all words within a query or for just one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Query()
public Query(int depth, QueryItemType type)
depth
- depth to query. 0 means just one level, 1 means two levels and so on.type
- type of items to return: assets, folders or both.public Query(java.lang.String keywords, boolean allwords, int depth, QueryItemType type)
keywords
- used to limit the number of items by words in their metadata.allwords
- if true to search for occurences of all words within keywords
or for just one.depth
- depth to query. 0 means just one level, 1 means two levels and so on.type
- type of items to return: assets, folders or both.Method Detail |
---|
public int getDepth()
public QueryItemType getItemType()
public java.lang.String getKeywords()
public boolean isAllwords()
public void addAssetType(java.lang.String assettypeid, java.util.List<java.lang.String> descriptors)
assettypeid
- identifier of an asset type.descriptors
- descritor identifiers belonging to this asset type.public java.util.List<java.lang.String> getAssetTypes()
public java.util.List<java.lang.String> getDescriptors(java.lang.String assettypeid) throws NotFoundException
assettypeid
- asset type identifier.
NotFoundException
- if the requested asset type is not present in this query.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |