// ensure that there are IDs to query
String locator = "Id";
if (ids == null) {
String msg = "The Id parameter was missing.";
throw new OwsException(OwsException.OWSCODE_MissingParameterValue,locator,msg);
} else if (ids.length == 0) {
String msg = "No Valid IDs were supplied.";
throw new OwsException(OwsException.OWSCODE_InvalidParameterValue,locator,msg);
}
// determine the queryables
// determine the discoverable
Discoverable discoverable = this.getDiscoveryContext().findDiscoverable("Id");
if (discoverable == null) {
String msg = "The Id queryable is not supported.";
throw new OwsException(OwsException.OWSCODE_InvalidParameterValue,locator,msg);
}
// build the discovery filter
query.getFilter().setRootClause(new LogicalClause.LogicalOr());
for (String id: ids) {
id = Val.chkStr(id);
if (id.length() == 0) {
String msg = "A supplied ID was empty.";
throw new OwsException(OwsException.OWSCODE_InvalidParameterValue,locator,msg);
} else {
PropertyClause propertyClause = new PropertyClause.PropertyIsEqualTo();
propertyClause.setTarget(discoverable);
propertyClause.setLiteral(id);
query.getFilter().getRootClause().getClauses().add(propertyClause);