@Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { descriptors = new HashMap<String, RecordDescriptor>(); // gather all the prefix to namespace associations in the set of records we are going to // support, we will use them to qualify the property names in the filters List<RecordDescriptor> allDescriptors = GeoServerExtensions.extensions(RecordDescriptor.class, applicationContext); for (RecordDescriptor rd : allDescriptors) { descriptors.put(rd.getOutputSchema(), rd); } }
@Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { descriptors = new HashMap<String, RecordDescriptor>(); // gather all the prefix to namespace associations in the set of records we are going to // support, we will use them to qualify the property names in the filters List<RecordDescriptor> allDescriptors = GeoServerExtensions.extensions(RecordDescriptor.class, applicationContext); for (RecordDescriptor rd : allDescriptors) { descriptors.put(rd.getOutputSchema(), rd); } } }
protected void support(RecordDescriptor descriptor) { descriptorByType.put(descriptor.getFeatureDescriptor().getName(), descriptor); descriptorByOutputSchema.put(descriptor.getOutputSchema(), descriptor); }
/** * Search for the record descriptor maching the request, throws a service exception in case none * is found * * @param request * @return */ private RecordDescriptor getRecordDescriptor(GetRecordByIdType request) { String outputSchema = request.getOutputSchema(); if (outputSchema == null) { outputSchema = CSW.NAMESPACE; request.setOutputFormat(CSW.NAMESPACE); } for (RecordDescriptor rd : recordDescriptors) { if (outputSchema.equals(rd.getOutputSchema())) { return rd; } } throw new ServiceException("Cannot encode records in output schema " + outputSchema, ServiceException.INVALID_PARAMETER_VALUE, "outputSchema"); }
/** * Search for the record descriptor maching the request, throws a service exception in case none * is found * * @param request * @return */ private RecordDescriptor getRecordDescriptor(GetRecordsType request) { String outputSchema = request.getOutputSchema(); if (outputSchema == null) { outputSchema = CSW.NAMESPACE; request.setOutputFormat(CSW.NAMESPACE); } for (RecordDescriptor rd : recordDescriptors) { if (outputSchema.equals(rd.getOutputSchema())) { return rd; } } throw new ServiceException("Cannot encode records in output schema " + outputSchema, ServiceException.INVALID_PARAMETER_VALUE, "outputSchema"); }
/** * Search for the record descriptor maching the request, throws a service exception in case none * is found * * @param request */ private RecordDescriptor getRecordDescriptor(GetRecordsType request) { String outputSchema = request.getOutputSchema(); if (outputSchema == null) { outputSchema = CSW.NAMESPACE; request.setOutputFormat(CSW.NAMESPACE); } for (RecordDescriptor rd : recordDescriptors) { if (outputSchema.equals(rd.getOutputSchema())) { return rd; } } throw new ServiceException( "Cannot encode records in output schema " + outputSchema, ServiceException.INVALID_PARAMETER_VALUE, "outputSchema"); } }
/** * Search for the record descriptor maching the request, throws a service exception in case none * is found * * @param request */ private RecordDescriptor getRecordDescriptor(GetRecordByIdType request) { String outputSchema = request.getOutputSchema(); if (outputSchema == null) { outputSchema = CSW.NAMESPACE; request.setOutputFormat(CSW.NAMESPACE); } for (RecordDescriptor rd : recordDescriptors) { if (outputSchema.equals(rd.getOutputSchema())) { return rd; } } throw new ServiceException( "Cannot encode records in output schema " + outputSchema, ServiceException.INVALID_PARAMETER_VALUE, "outputSchema"); } }
getRecords(q, Transaction.AUTO_COMMIT, rd.getOutputSchema()) .accepts( new FeatureVisitor() {