|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.aims.mtier.model.metadata.query.Clause
public class Clause
Defines a metadata query clause. These clauses can then be embedded to result in complex queries.
Starting from ArcIMS 9.1, the following rules must be followed when searching a Metadata Service:
1. A Clause instance can have other Clause instances as "inner"
or "child" Clauses, but an "inner" Clause cannot
have another Clause instance as an "inner" Clause. That is, the "base" or "parent" Clause cannot have
a "grandchild" Clause.
2. Only an inner Clause can call these methods:
Group A : setDocumentInfoCollection(), setSubsetCollection(), setUpdatedAfter(),
or setUpdatedBefore().
Group B : setTextQueryCollection(), setValueQueryCollection().
3. An inner Clause can only call methods either from Group A or Group B. You cannot mix
the two groups.
4. Inner clauses that call methods from Group A must be added to the ClauseCollection
of the base Clause before inner Clauses that call methods from Group B; Inner Clauses that
call only one method from Group B should be added before inner Clauses that call multiple
methods from Group B.
5. Methods from Group A cannot be combined in an inner Clause, though each
method may be used multiple times. Methods from Group B may be combined in an inner Clause.
6. The base Clause may only contain one EnvelopeCollection, which in turn may only contain
one Envelope. The EnvelopeCollection may be added to the base Clause in any order.
A sample following above rules would be:
Clause baseClause = new Clause();
ClauseCollection clauseCollect = new ClauseCollection();
Clause innerClause1 = new Clause();
DocumentInfo dInfo = new DocumentInfo();
DocumentInfoCollection dInfoColl = new DocumentInfoCollection();
dInfoColl.addDocumentInfo(dInfo);
innerClause1.setDocumentInfoCollection(dInfoColl);
Clause innerClause2 = new Clause();
Subset sInfo=new Subset();
SubsetCollection sColl=new SubsetCollection();
sColl.addSubset(sInfo);
innerClause2.setSubsetCollection(sColl);
Clause innerClause3 = new Clause();
TextQuery tQuery=new TextQuery();
TextQueryCollection tQueryColl=new TextQueryCollection();
tQueryColl.addQuery(tQuery);
innerClause3.setTextQueryCollection(tQueryColl);
Clause innerClause4 = new Clause();
TextQuery tQuery2=new TextQuery();
TextQueryCollection tQueryColl2=new TextQueryCollection();
tQueryColl2.addQuery(tQuery2);
ValueQuery vQuery=new ValueQuery();
ValueQueryCollection vQueryColl=new ValueQueryCollection();
vQueryColl.addQuery(vQuery);
innerClause4.setTextQueryCollection(tQueryColl2);
nnerClause4.setValueQueryCollection(vQueryColl);
clauseCollect.addClause(innerClause1);
clauseCollect.addClause(innerClause2);
clauseCollect.addClause(innerClause3);
clauseCollect.addClause(innerClause4);
baseClause.setClauseCollection(clauseCollect);
Field Summary | |
---|---|
static int |
AND_OPERATOR
|
static int |
CONTENTTYPE_SORT
|
static int |
DATE_SORT
|
static int |
DOCUMENT
|
static int |
GLOBALAREA_SORT
|
static int |
LOCALAREA_SORT
|
static int |
NAME_SORT
|
static int |
NONE
|
static int |
OR_OPERATOR
|
static int |
RELEVANCE_SORT
|
static int |
SEARCH
|
static int |
XOR_OPERATOR
|
Constructor Summary | |
---|---|
Clause()
Constructs an instance of a Clause object. |
Method Summary | |
---|---|
DatasetCollection |
execute(ConnectionProxy connection)
Executes the query and returns the results as a DatasetCollection. |
ClauseCollection |
getClauseCollection()
Returns the ClauseCollection associated with this Clause. |
Element |
getClauseElement()
Returns this object as an Element for building XML documents. |
DocumentInfoCollection |
getDocumentInfoCollection()
Returns the DocumentInfoCollection. |
EnvelopeCollection |
getEnvelopeCollection()
Returns the EnvelopeCollection. |
int |
getFolderMask()
Returns the FolderMask. |
boolean |
getFullOutput()
Returns the value of FullOutput. |
int |
getGndextent()
Returns the value of Gndextent. |
String |
getGndextentString()
Returns the string value of the Gndextent. |
int |
getMaxResults()
Returns the maximum number of results that will be returned by the server. |
int |
getOperator()
Returns the operator used to evaluate serach criteria. |
String |
getOperatorString()
Returns the string value of the operator . |
int |
getSort()
Returns the first type used to sort the results. |
int |
getSort2()
Returns the second type used to sort the results. |
String |
getSort2String()
Returns the string value of the second sort type. |
String |
getSortString()
Returns the string value of the first sort type. |
int |
getStartResults()
Returns the position from which the results will be returned. |
SubsetCollection |
getSubsetCollection()
Returns the SubsetCollection. |
TextQueryCollection |
getTextQueryCollection()
Returns the TextQueryCollection. |
boolean |
getThumbnail()
Returns the value of thumbnail. |
String |
getUpdatedAfter()
Returns the value of UpdatedAfter. |
String |
getUpdatedBefore()
Returns the value of UpdatedBefore. |
ValueQueryCollection |
getValueQueryCollection()
Returns the ValueQueryCollection. |
void |
setClauseCollection(ClauseCollection newClauseCollection)
Sets the ClauseCollection. |
void |
setDocumentInfoCollection(DocumentInfoCollection newDocumentInfoCollection)
Sets the DocumentInfoCollection. |
void |
setEnvelopeCollection(EnvelopeCollection newEnvelopeCollection)
Sets the EnvelopeCollection. |
void |
setFolderMask(int newFolderMask)
Sets the value of FolderMask. |
void |
setFullOutput(boolean fulloutput)
Sets the FullOutput. |
void |
setGndextent(int gndextentValue)
Sets the Gndextent. |
void |
setMaxResults(int newMaxResults)
Sets the maximum number of results that will be returned by the server. |
void |
setOperator(int newOperator)
Sets the operator used to evaluate serach criteria. |
void |
setSort(int sortValue)
Set the first type used to sort the results. |
void |
setSort2(int sortValue)
Sets the second type used to sort the results. |
void |
setStartResults(int newStartResults)
Sets the position from which the results will be returned. |
void |
setSubsetCollection(SubsetCollection newSubsetCollection)
Sets the SubsetCollection. |
void |
setTextQueryCollection(TextQueryCollection newTextQueryCollection)
Sets the given TextQueryCollection. |
void |
setThumbnail(boolean thumbnail)
Sets the thumbnail. |
void |
setUpdatedAfter(String updated)
Sets the UdatedAfter. |
void |
setUpdatedBefore(String updated)
Sets the UdatedBefore. |
void |
setValueQueryCollection(ValueQueryCollection newValueQueryCollection)
Sets the ValueQueryCollection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int AND_OPERATOR
public static final int OR_OPERATOR
public static final int XOR_OPERATOR
public static final int NAME_SORT
public static final int RELEVANCE_SORT
public static final int CONTENTTYPE_SORT
public static final int LOCALAREA_SORT
public static final int GLOBALAREA_SORT
public static final int DATE_SORT
public static final int NONE
public static final int DOCUMENT
public static final int SEARCH
Constructor Detail |
---|
public Clause()
Method Detail |
---|
public void setEnvelopeCollection(EnvelopeCollection newEnvelopeCollection)
public EnvelopeCollection getEnvelopeCollection()
public void setClauseCollection(ClauseCollection newClauseCollection)
public ClauseCollection getClauseCollection()
public void setTextQueryCollection(TextQueryCollection newTextQueryCollection)
public TextQueryCollection getTextQueryCollection()
public void setValueQueryCollection(ValueQueryCollection newValueQueryCollection)
public ValueQueryCollection getValueQueryCollection()
public void setSubsetCollection(SubsetCollection newSubsetCollection)
public SubsetCollection getSubsetCollection()
public void setDocumentInfoCollection(DocumentInfoCollection newDocumentInfoCollection)
public DocumentInfoCollection getDocumentInfoCollection()
public void setMaxResults(int newMaxResults)
public int getMaxResults()
public void setStartResults(int newStartResults)
public int getStartResults()
public void setFolderMask(int newFolderMask)
public int getFolderMask()
public void setOperator(int newOperator)
public int getOperator()
public String getOperatorString()
public void setSort(int sortValue)
sortValue
- public int getSort()
public String getSortString()
public void setGndextent(int gndextentValue)
gndextentValue
- public int getGndextent()
public String getGndextentString()
public void setFullOutput(boolean fulloutput)
fulloutput
- public boolean getFullOutput()
public void setThumbnail(boolean thumbnail)
thumbnail
- public boolean getThumbnail()
public void setSort2(int sortValue)
sortValue
- public int getSort2()
public String getSort2String()
public void setUpdatedAfter(String updated)
public String getUpdatedAfter()
public void setUpdatedBefore(String updated)
public String getUpdatedBefore()
public Element getClauseElement() throws com.esri.aims.mtier.model.axl.AXLAttributeException
com.esri.aims.mtier.model.axl.AXLAttributeException
public DatasetCollection execute(ConnectionProxy connection) throws com.esri.aims.mtier.model.axl.AXLAttributeException, ConnectionParameterException, com.esri.aims.mtier.io.http.UnableToPingEsrimapException, AuthenticationException, SAXException, IOException
com.esri.aims.mtier.model.axl.AXLAttributeException
ConnectionParameterException
com.esri.aims.mtier.io.http.UnableToPingEsrimapException
AuthenticationException
SAXException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |