GB/T 40764-2021 Geographic information—Filter encoding
GB/T 40764-2021 Geographic information—Filter encoding
Basic Information
Scope
This standard describes the system-neutral XML and KVP encoding for expressing projection, selection, and sorting clause syntax, which are collectively referred to as query expressions.
These components are modular and can be used in combination with other standards or independently.
Example 1: GB/T 30169 uses some or all of the above components.
This standard defines an abstract component called "AbstractQueryExpression", which other specifications can subclass to implement query operations for specific query elements.
This standard also defines another abstract query component called "AbstractAdhocQueryExpression". It derives from AbstractQueryExpression, and other specifications can subclass specific query elements according to the following query pattern:
The abstract query elements in the service specification can subclass a specific query element to allow clients to specify a list of resource types, optional projection clauses, optional selection clauses, and optional sorting clauses to query a subset of resources that meet the selection clauses.
This pattern is called an ad hoc query pattern, which is different from the stored query expressions that can be called based on names or identifiers, because the server does not know the query until it is submitted for processing.
This standard also describes the system-neutral XML and KVP encoding for expressing selection clauses. XML expressions are easy to validate, parse, and convert into a server-specific language for objects that need to be returned or modified in a persistent object storage.
Example 2: XML-encoded filter expressions can be converted into WHERE clauses in SQL SELECT statements to retrieve data stored in SQL relational databases. Similarly, XML-encoded filters can be converted into an XPath (XML path) or XPointer (XML pointer) expression to retrieve data from XML documents.
This standard defines XML encoding for the following predicates: