public class TLcdCSWQuery extends TLcdCSWAbstractQuery
constraint
allows filtering the records that should be retrievedtypeNames
(e.g. cswRecord, gmd:MD_Metadata) specify the property set that can be used
to filter queries (for example, match the dc:title or apiso:title).
element set name
or elements
specify which properties of
the output record to include in the response.
sortBy
specifies how the resulting records should be sortedTLcdCSWGetRecordsRequest
or TLcdCSWGetRecordByIdRequest
.Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
CONSTRAINT_PROPERTY
Data property that maps to the
Constraint element. |
static TLcdDataProperty |
ELEMENTS_PROPERTY
Data property that maps to the choice between the
ElementSetName and ElementName elements. |
static TLcdDataProperty |
SORT_BY_PROPERTY
Data property that maps to the
SortBy element. |
static TLcdDataProperty |
TYPE_NAMES_PROPERTY
Data property that maps to the
typeNames attribute. |
Constructor and Description |
---|
TLcdCSWQuery() |
TLcdCSWQuery(TLcdDataType aType) |
Modifier and Type | Method and Description |
---|---|
TLcdCSWQueryConstraint |
getConstraint()
Returns the value of the property that maps to the
Constraint element. |
List<QName> |
getElements()
Returns the set of properties of the output record to include in the response.
|
TLcdCSWElementSetName |
getElementSetName()
Returns the element set name (e.g.
|
TLcdOGCSortBy |
getSortBy()
Returns the value of the property that maps to the
SortBy element. |
List<QName> |
getTypeNames()
Returns the property sets that can be used to
filter queries (for example, match the dc:title or apiso:title). |
void |
setConstraint(TLcdCSWQueryConstraint aValue)
Specifies which records should be retrieved.
|
void |
setElements(List<QName> aElements)
Specifies the set of properties of the output record to include in the response.
|
void |
setElementSetName(TLcdCSWElementSetName aSetName)
Specifies an element set name (e.g.
|
void |
setSortBy(TLcdOGCSortBy aValue)
Sets the value of the property that maps to the
SortBy element. |
void |
setTypeNames(List<QName> aValue)
Sets the value of the property that maps to the
typeNames attribute. |
public static final TLcdDataProperty TYPE_NAMES_PROPERTY
typeNames
attribute.
The possible values for this property are instances of List<QName>
.public static final TLcdDataProperty ELEMENTS_PROPERTY
ElementSetName
and ElementName
elements.
The possible values for this property are instances of
TLcdCSWElementSetName
List<String>
public static final TLcdDataProperty CONSTRAINT_PROPERTY
Constraint
element.
The possible values for this property are instances of TLcdCSWQueryConstraint
.public static final TLcdDataProperty SORT_BY_PROPERTY
SortBy
element.
The possible values for this property are instances of TLcdOGCSortBy
.public TLcdCSWQuery()
public TLcdCSWQuery(TLcdDataType aType)
public TLcdCSWElementSetName getElementSetName()
getElements()
,
ELEMENTS_PROPERTY
public void setElementSetName(TLcdCSWElementSetName aSetName)
getElements()
.aSetName
- the element set name defining the output propertiessetElements(java.util.List<javax.xml.namespace.QName>)
,
ELEMENTS_PROPERTY
public List<QName> getElements()
getElementSetName()
,
ELEMENTS_PROPERTY
public void setElements(List<QName> aElements)
getElementSetName()
.aElements
- the names of the desired output propertiessetElementSetName(com.luciad.ogc.csw.model.TLcdCSWElementSetName)
,
ELEMENTS_PROPERTY
public void setConstraint(TLcdCSWQueryConstraint aValue)
TLcdOGCFilter filter = new TLcdOGCFilter(
TLcdOGCFilterFactory.like(
new TLcdOGCPropertyName(TLcdDCElemSimpleLiteral.TITLE),
"My Title"
)
);
query.setConstraint(new TLcdCSWQueryConstraint(filter, "1.1.0"));
Make sure to declare the property set
you're going to filter on.aValue
- the value to set for the CONSTRAINT_PROPERTY
property.public List<QName> getTypeNames()
filter
queries (for example, match the dc:title or apiso:title).
You can retrieve type names from the record type
constants.
The following snippet adds support for filtering records using CSW 2.0.2's default Dublin Core elements (e.g. dc:title):
getTypeNames().add(TLcdCSWRecordType.CSW_202.getTypeName());
TYPE_NAMES_PROPERTY
property.TLcdCSWRecordType.getTypeName()
public void setTypeNames(List<QName> aValue)
typeNames
attribute.aValue
- the value to set for the TYPE_NAMES_PROPERTY
property.public TLcdCSWQueryConstraint getConstraint()
Constraint
element.CONSTRAINT_PROPERTY
property.public TLcdOGCSortBy getSortBy()
SortBy
element.SORT_BY_PROPERTY
property.public void setSortBy(TLcdOGCSortBy aValue)
SortBy
element.aValue
- the value to set for the SORT_BY_PROPERTY
property.