if (query.getFeatureVersion() != null) {
dataQuery.setVersion(query.getFeatureVersion());
}
//create the Hints to set at the end
final Hints hints = new Hints();
//handle xlink traversal depth
if (request.getTraverseXlinkDepth() != null) {
//TODO: make this an integer in the model, and have hte NumericKvpParser
// handle '*' as max value
Integer traverseXlinkDepth = traverseXlinkDepth( request.getTraverseXlinkDepth() );
//set the depth as a hint on the query
hints.put(Hints.ASSOCIATION_TRAVERSAL_DEPTH, traverseXlinkDepth);
}
//handle xlink properties
if (!query.getXlinkPropertyName().isEmpty() ) {
for ( Iterator x = query.getXlinkPropertyName().iterator(); x.hasNext(); ) {
XlinkPropertyNameType xlinkProperty = (XlinkPropertyNameType) x.next();
Integer traverseXlinkDepth = traverseXlinkDepth( xlinkProperty.getTraverseXlinkDepth() );
//set the depth and property as hints on the query
hints.put(Hints.ASSOCIATION_TRAVERSAL_DEPTH, traverseXlinkDepth );
PropertyName xlinkPropertyName = filterFactory.property( xlinkProperty.getValue() );
hints.put(Hints.ASSOCIATION_PROPERTY, xlinkPropertyName );
dataQuery.setHints( hints );
//TODO: support multiple properties
break;
}
}
//tell the datastore to use a lite coordinate sequence factory, if possible
hints.put(Hints.JTS_COORDINATE_SEQUENCE_FACTORY, new LiteCoordinateSequenceFactory());
//finally, set the hints
dataQuery.setHints(hints);
return dataQuery;