public GetDomain(CSWInfo csw, CatalogStore store) { this.csw = csw; this.store = store; try { for (RecordDescriptor rd : store.getRecordDescriptors()) { for (Name prop : store.getCapabilities().getDomainQueriables(rd.getFeatureDescriptor().getName())) { attributeTypeMap.put(prop, rd.getFeatureDescriptor().getName()); Enumeration declaredPrefixes = rd.getNamespaceSupport().getDeclaredPrefixes(); while (declaredPrefixes.hasMoreElements()) { String prefix = (String) declaredPrefixes.nextElement(); String uri = rd.getNamespaceSupport().getURI(prefix); ns.declarePrefix(prefix, uri); } } } } catch (IOException e) { throw new ServiceException(e, "Failed to retrieve the domain values", ServiceException.NO_APPLICABLE_CODE); } }
return this.store.getDomain(typeName, attName);
int[] counts = new int[queries.size()]; for (int i = 0; i < queries.size(); i++) { counts[i] = store.getRecordsCount(queries.get(i), Transaction.AUTO_COMMIT); numberOfRecordsMatched += counts[i]; FeatureCollection collection = store.getRecords(queries.get(i), Transaction.AUTO_COMMIT, request.getOutputSchema()); if(collection != null && collection.size() > 0) { results.add(collection);
private Set<Name> getSupportedTypes() throws IOException { Set<Name> result = new HashSet<Name>(); for (RecordDescriptor rd : store.getRecordDescriptors()) { result.add(rd.getFeatureDescriptor().getName()); } return result; }
/** * Returns the requested RepositoryItem * * @param request */ public RepositoryItem run(GetRepositoryItemType request) { try { RepositoryItem item = store.getRepositoryItem(request.getId()); if (item == null) { // by spec we have to return a 404 throw new HttpErrorCodeException( 404, "No repository item found for id " + request.getId()); } return item; } catch (IOException e) { throw new ServiceException("Failed to load the repository item", e); } } }
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; } } }
OperationMetadata_GetRecords(owsf, baseUrl, operationsMetadata); OperationMetadata_GetRecordById(owsf, baseUrl, operationsMetadata); if (store.getCapabilities().supportsTransactions()) { OperationMetadata_Transaction(owsf, baseUrl, operationsMetadata);
private Set<Name> getSupportedTypes() throws IOException { Set<Name> result = new HashSet<Name>(); for (RecordDescriptor rd : store.getRecordDescriptors()) { result.add(rd.getFeatureDescriptor().getName()); } return result; }
/** * Returns the requested RepositoryItem * * @param request * @return */ public RepositoryItem run(GetRepositoryItemType request) { try { RepositoryItem item = store.getRepositoryItem(request.getId()); if(item == null) { // by spec we have to return a 404 throw new HttpErrorCodeException(404, "No repository item found for id " + request.getId()); } return item; } catch (IOException e) { throw new ServiceException("Failed to load the repository item", e); } } }
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; } } }
OperationMetadata_GetRecords(owsf, baseUrl, operationsMetadata); OperationMetadata_GetRecordById(owsf, baseUrl, operationsMetadata); if (store.getCapabilities().supportsTransactions()) { OperationMetadata_Transaction(owsf, baseUrl, operationsMetadata);
public GetDomain(CSWInfo csw, CatalogStore store) { this.csw = csw; this.store = store; try { for (RecordDescriptor rd : store.getRecordDescriptors()) { for (Name prop : store.getCapabilities() .getDomainQueriables(rd.getFeatureDescriptor().getName())) { attributeTypeMap.put(prop, rd.getFeatureDescriptor().getName()); Enumeration declaredPrefixes = rd.getNamespaceSupport().getDeclaredPrefixes(); while (declaredPrefixes.hasMoreElements()) { String prefix = (String) declaredPrefixes.nextElement(); String uri = rd.getNamespaceSupport().getURI(prefix); ns.declarePrefix(prefix, uri); } } } } catch (IOException e) { throw new ServiceException( e, "Failed to retrieve the domain values", ServiceException.NO_APPLICABLE_CODE); } }
int[] counts = new int[queries.size()]; for (int i = 0; i < queries.size(); i++) { counts[i] = store.getRecordsCount(queries.get(i), Transaction.AUTO_COMMIT); numberOfRecordsMatched += counts[i]; for (int i = 0; i < queries.size(); i++) { FeatureCollection collection = store.getRecords( queries.get(i), Transaction.AUTO_COMMIT, request.getOutputSchema()); if (collection != null && collection.size() > 0) {
return getFeatureDescriptors(store.getRecordDescriptors()); } else { List<AttributeDescriptor> result = new ArrayList<AttributeDescriptor>(); getFeatureDescriptors(store.getRecordDescriptors()); for (AttributeDescriptor descriptor : descriptors) {
if (typeName != null) return this.store.getDomain(typeName, attName);
for (RecordDescriptor rd : store.getRecordDescriptors()) { List<Name> queriables = store.getCapabilities().getDomainQueriables(rd.getFeatureDescriptor().getName());
int[] counts = new int[queries.size()]; for (int i = 0; i < queries.size(); i++) { counts[i] = store.getRecordsCount(queries.get(i), Transaction.AUTO_COMMIT); numberOfRecordsMatched += counts[i]; results.add(store.getRecords(q, Transaction.AUTO_COMMIT, request.getOutputSchema()));
return getFeatureDescriptors(store.getRecordDescriptors()); } else { List<AttributeDescriptor> result = new ArrayList<AttributeDescriptor>(); requested.add(name.getLocalPart()); AttributeDescriptor[] descriptors = getFeatureDescriptors(store.getRecordDescriptors()); for (AttributeDescriptor descriptor : descriptors) {
for (RecordDescriptor rd : store.getRecordDescriptors()) { List<Name> queriables = store.getCapabilities() .getDomainQueriables(rd.getFeatureDescriptor().getName());
int[] counts = new int[queries.size()]; for (int i = 0; i < queries.size(); i++) { counts[i] = store.getRecordsCount(queries.get(i), Transaction.AUTO_COMMIT); numberOfRecordsMatched += counts[i]; store.getRecords( q, Transaction.AUTO_COMMIT, request.getOutputSchema()));