}
public ListStoredQueriesResponseType run(ListStoredQueriesType request) throws WFSException {
Wfs20Factory factory = Wfs20Factory.eINSTANCE;
ListStoredQueriesResponseType response = factory.createListStoredQueriesResponseType();
for (StoredQuery sq : storedQueryProvider.listStoredQueries()) {
StoredQueryListItemType item = factory.createStoredQueryListItemType();
item.setId(sq.getName());
TitleType title = factory.createTitleType();
title.setValue(sq.getTitle());
item.getTitle().add(title);
if (!sq.getFeatureTypes().isEmpty()) {
item.getReturnFeatureType().addAll(sq.getFeatureTypes());
}
else {
item.getReturnFeatureType().add(new QName(""));
}
response.getStoredQuery().add(item);
}
return response;
}