public Element execute(Element request, ServiceContext context) throws CatalogException { checkService(request); checkVersion(request); Element response = new Element(getName() + "Response", Csw.NAMESPACE_CSW); String[] propertyNames = getParameters(request, "PropertyName"); String[] parameterNames = getParameters(request, "ParameterName"); String cswServiceSpecificConstraint = request.getChildText(Geonet.Elem.FILTER); // PropertyName handled first. if (propertyNames != null) { List<Element> domainValues; try { domainValues = handlePropertyName( propertyNames, context, false, CatalogConfiguration.getMaxNumberOfRecordsForPropertyNames(), cswServiceSpecificConstraint, _luceneConfig); } catch (Exception e) { Log.error(Geonet.CSW, "Error getting domain value for specified PropertyName : " + e); throw new NoApplicableCodeEx( "Raised exception while getting domain value for specified PropertyName : " + e); } response.addContent(domainValues); return response; } if (parameterNames != null) { List<Element> domainValues = handleParameterName(parameterNames); response.addContent(domainValues); } return response; }