Modifier and Type | Class and Description |
---|---|
static class |
ItemSearch.IdentifierResults |
class |
ItemSearch.MultipleMatchException |
Constructor and Description |
---|
ItemSearch() |
ItemSearch(UserI u,
GenericWrapperElement e)
Instanciate object with a user and the search element.
|
ItemSearch(UserI u,
GenericWrapperElement e,
CriteriaCollection cc)
Instanciate object with a user, the search element, and a collection of search criteria.
|
ItemSearch(UserI u,
String elementName)
Instanciate object with a user and the search element.
|
ItemSearch(UserI u,
String elementName,
CriteriaCollection cc)
Instanciate object with a user, the search element, and a collection of search criteria.
|
Modifier and Type | Method and Description |
---|---|
void |
add(SQLClause c)
Add a search criteria (org.nrg.xft.services.search.SearchCriteria) or a collection of criteria (org.nrg.xft.services.search.CriteriaCollection).
|
void |
addCriteria(GenericWrapperField f,
Object value)
Add a search criteria using the specific Schema Field
|
void |
addCriteria(GenericWrapperField f,
Object value,
String comparison)
Add a search criteria using the specific Schema Field
|
void |
addCriteria(SQLClause c)
Add a search criteria (org.nrg.xft.services.search.SearchCriteria) or a collection of criteria (org.nrg.xft.services.search.CriteriaCollection).
|
void |
addCriteria(String xmlPath,
Object value)
Add a search criteria (comparison type is equals (default).
|
void |
addCriteria(String xmlPath,
Object value,
String comparison)
Add a search criteria
|
void |
allData() |
ItemCollection |
exec() |
ItemCollection |
exec(boolean withChildren)
Execute the search and return the matching XFTItems in an ItemCollection.
|
ItemCollection |
exec(boolean withChildren,
boolean extend)
Execute the search and return the matching XFTItems in an ItemCollection.
|
ItemCollection |
execute() |
XFTTable |
executeToTable(boolean showMetaFields) |
static ItemCollection |
GetAllItems(String elementName,
UserI user,
boolean preLoad)
Get all XFTItems of the specified data type.
|
CriteriaCollection |
getCriteriaCollection() |
GenericWrapperElement |
getElement() |
String |
getFunctionName() |
List<List<ItemSearch.IdentifierResults>> |
getIdentifierResults(String login) |
List<List<ItemSearch.IdentifierResults>> |
getIdentifiers() |
static XFTItem |
GetItem(String xmlPath,
Object v,
UserI user,
boolean preLoad)
Pass in a String identifying the XML field which you are searching by: ex.
|
static ItemCollection |
GetItems(CriteriaCollection cc,
UserI user,
boolean preLoad)
Gets the matching items based on the specified criteria.
|
static ItemCollection |
GetItems(String elementName,
CriteriaCollection cc,
UserI user,
boolean preLoad)
Gets the matching items based on the specified criteria.
|
static ItemCollection |
GetItems(String xmlPath,
Object v,
UserI user,
boolean preLoad)
Pass in a String identifying the XML field which you are searching by: ex.
|
static ItemCollection |
GetItems(String xmlPath,
String comparisonType,
Object v,
UserI user,
boolean preLoad)
Pass in a String identifying the XML field which you are searching by: ex.
|
static ItemSearch |
GetItemSearch(String elementName,
UserI user)
Get an empty ItemSearch object for the specified data type.
|
ItemCollection |
getItemsFromKeys(List<List<ItemSearch.IdentifierResults>> matches,
String login) |
String |
getLevel() |
UserI |
getUser() |
boolean |
isAllowMultipleMatches() |
boolean |
isAllowMultiples() |
boolean |
isExtend() |
boolean |
isPreventLoop() |
boolean |
isRootItem() |
void |
onlyActiveData() |
ItemCollection |
populateItems(GenericWrapperElement element,
XFTTable table,
QueryOrganizer qo,
boolean extend,
boolean allowMultiples)
translates a XFTTable into a list of items with all available sub-items populated.
|
void |
setAllowMultipleMatches(boolean allowMultipleMatches) |
void |
setAllowMultiples(boolean allowMultiples) |
void |
setCriteriaCollection(CriteriaCollection criteriaCollection) |
void |
setElement(GenericWrapperElement element) |
void |
setElement(String elementName) |
void |
setExtend(boolean extend) |
void |
setLevel(String level) |
void |
setPreventLoop(boolean preventLoop) |
void |
setRootItem(boolean rootItem) |
void |
setUser(UserI user) |
String |
toString() |
public String query
public ItemSearch()
public ItemSearch(UserI u, String elementName) throws ElementNotFoundException
u
- elementName
- ElementNotFoundException
public ItemSearch(UserI u, GenericWrapperElement e)
u
- e
- public ItemSearch(UserI u, String elementName, CriteriaCollection cc) throws ElementNotFoundException
u
- elementName
- cc
- ElementNotFoundException
public ItemSearch(UserI u, GenericWrapperElement e, CriteriaCollection cc)
u
- e
- cc
- public ItemCollection exec(boolean withChildren) throws Exception
withChildren
- Exception
public ItemCollection exec(boolean withChildren, boolean extend) throws IllegalAccessException, Exception
withChildren
- extend
- Exception
IllegalAccessException
public ItemCollection execute() throws IllegalAccessException, MetaDataException, Exception
public XFTTable executeToTable(boolean showMetaFields) throws IllegalAccessException, MetaDataException, Exception
public List<List<ItemSearch.IdentifierResults>> getIdentifiers() throws Exception
Exception
public List<List<ItemSearch.IdentifierResults>> getIdentifierResults(String login) throws Exception
Exception
public String getFunctionName()
public ItemCollection getItemsFromKeys(List<List<ItemSearch.IdentifierResults>> matches, String login) throws IllegalAccessException, MetaDataException, Exception
public ItemCollection exec() throws IllegalAccessException, MetaDataException, Exception
public void addCriteria(SQLClause c)
c
- public void add(SQLClause c)
c
- public void addCriteria(String xmlPath, Object value, String comparison) throws Exception
xmlPath
- ex. xnat:mrSessionData.scannervalue
- SCANNER_NAMEcomparison
- (=, >, <, >=, <=, IS, IS NOT)Exception
public void addCriteria(String xmlPath, Object value) throws Exception
xmlPath
- value
- Exception
public void addCriteria(GenericWrapperField f, Object value, String comparison) throws Exception
f
- value
- comparison
- Exception
public void addCriteria(GenericWrapperField f, Object value) throws Exception
f
- value
- Exception
public ItemCollection populateItems(GenericWrapperElement element, XFTTable table, QueryOrganizer qo, boolean extend, boolean allowMultiples) throws ElementNotFoundException, XFTInitException, FieldNotFoundException, IllegalAccessException, MetaDataException, Exception
element
- table
- qo
- extend
- allowMultiples
- ElementNotFoundException
XFTInitException
FieldNotFoundException
IllegalAccessException
MetaDataException
Exception
public CriteriaCollection getCriteriaCollection()
getCriteriaCollection
in interface SearchI
public void setCriteriaCollection(CriteriaCollection criteriaCollection)
setCriteriaCollection
in interface SearchI
criteriaCollection
- The criteriaCollection to set.public GenericWrapperElement getElement()
getElement
in interface SearchI
public void setElement(GenericWrapperElement element)
setElement
in interface SearchI
element
- The element to set.public void setElement(String elementName) throws ElementNotFoundException
elementName
- The element to set.ElementNotFoundException
public void setUser(UserI user)
public static ItemCollection GetItems(String xmlPath, String comparisonType, Object v, UserI user, boolean preLoad) throws Exception
xmlPath
- v
- user
- Exception
public static ItemCollection GetItems(String xmlPath, Object v, UserI user, boolean preLoad) throws Exception
xmlPath
- v
- user
- Exception
public static XFTItem GetItem(String xmlPath, Object v, UserI user, boolean preLoad) throws Exception
xmlPath
- v
- user
- Exception
public static ItemCollection GetItems(String elementName, CriteriaCollection cc, UserI user, boolean preLoad) throws Exception
cc
- user
- Exception
public static ItemCollection GetItems(CriteriaCollection cc, UserI user, boolean preLoad) throws Exception
cc
- user
- Exception
public static ItemSearch GetItemSearch(String elementName, UserI user) throws Exception
elementName
- user
- Exception
public static ItemCollection GetAllItems(String elementName, UserI user, boolean preLoad) throws Exception
elementName
- user
- Exception
public boolean isAllowMultiples()
public void setAllowMultiples(boolean allowMultiples)
allowMultiples
- The allowMultiples to set.public String getLevel()
public void setLevel(String level)
level
- The level to set. ('active', 'quarantine', or 'all')public void onlyActiveData()
public void allData()
public boolean isExtend()
public void setExtend(boolean extend)
extend
- The extend to set.public boolean isRootItem()
public void setRootItem(boolean rootItem)
rootItem
- The rootItem to set.public boolean isAllowMultipleMatches()
public void setAllowMultipleMatches(boolean allowMultipleMatches)
allowMultipleMatches
- The allowMultipleMatches to set.public boolean isPreventLoop()
public void setPreventLoop(boolean preventLoop)
preventLoop
- the preventLoop to setCopyright © 2015 Neuroinformatics Research Group. All rights reserved.