@Override public CSWRecordsResult getRecords(GetRecordsType request) throws ServiceException { checkStore(); List<RecordDescriptor> descriptors = GeoServerExtensions.extensions(RecordDescriptor.class, context); return new GetRecords(this.csw, store, descriptors).run(request); }
private List<Query> toGtQueries(RecordDescriptor outputRd, QueryType query, GetRecordsType request) throws IOException { Set<Name> supportedTypes = getSupportedTypes(); RecordDescriptor rd = getRecordDescriptor(typeName); q.setProperties(getPropertyNames(outputRd, query)); q.setSortBy(query.getSortBy()); try {
RecordDescriptor outputRd = getRecordDescriptor(request); QueryType cswQuery = (QueryType) request.getQuery(); List<Query> queries = toGtQueries(outputRd, cswQuery, request); ElementSetType elementSet = getElementSet(cswQuery);
private List<PropertyName> getPropertyNames(RecordDescriptor rd, QueryType query) { if (query.getElementName() != null && !query.getElementName().isEmpty()) { // turn the QName into PropertyName. We don't do any verification cause the // elements in the actual feature could be parts of substitution groups // of the elements in the feature's schema List<PropertyName> result = new ArrayList<PropertyName>(); for (QName qn : query.getElementName()) { result.add(store.translateProperty(rd, Types.toTypeName(qn))); } return result; } else { ElementSetType elementSet = getElementSet(query); List<Name> properties = rd.getPropertiesForElementSet(elementSet); if (properties != null) { List<PropertyName> result = new ArrayList<PropertyName>(); for (Name pn : properties) { result.add(store.translateProperty(rd, pn)); } return result; } else { // the profile is the full one return null; } } }
Set<Name> supportedTypes = getSupportedTypes(); RecordDescriptor rd = getRecordDescriptor(typeName); q.setProperties(getPropertyNames(outputRd, query)); q.setSortBy(query.getSortBy()); try {
RecordDescriptor outputRd = getRecordDescriptor(request); QueryType cswQuery = (QueryType) request.getQuery(); List<Query> queries = toGtQueries(outputRd, cswQuery, request); ElementSetType elementSet = getElementSet(cswQuery);
private List<PropertyName> getPropertyNames(RecordDescriptor rd, QueryType query) { if(query.getElementName() != null && !query.getElementName().isEmpty()) { // turn the QName into PropertyName. We don't do any verification cause the // elements in the actual feature could be parts of substitution groups // of the elements in the feature's schema List<PropertyName> result = new ArrayList<PropertyName>(); for (QName qn : query.getElementName()) { result.add(store.translateProperty(rd, Types.toTypeName(qn))); } return result; } else { ElementSetType elementSet = getElementSet(query); List<Name> properties = rd.getPropertiesForElementSet(elementSet); if(properties != null) { List<PropertyName> result = new ArrayList<PropertyName>(); for (Name pn : properties) { result.add(store.translateProperty(rd, pn)); } return result; } else { // the profile is the full one return null; } } }
@Override public CSWRecordsResult getRecords(GetRecordsType request) throws ServiceException { checkStore(); List<RecordDescriptor> descriptors = GeoServerExtensions.extensions(RecordDescriptor.class, context); return new GetRecords(getServiceInfo(), store, descriptors).run(request); }