Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

store FES filter as dict key to allow for repository parsing #510

Merged
merged 1 commit into from May 30, 2017

Conversation

tomkralidis
Copy link
Member

Overview

This PR introduces the ability to store the OGC filter as a generic dict as part of the constraint which is passed to repository queries. This is an interim step to which the ultimate goal is to have pycsw repository objects delegated the responsibility to parse OGC filter grammar into their specific syntax.

Longer term, default/internal pycsw refactoring will occur around pyfes. This PR immediately enables any repository plugin to tie filters deep into their backend by allowing translation functionality against a Python friendly object/representation of OGC filter grammar.

Sample OGC filter parsed into a dict:

{
    "ogc:Filter": {
        "ogc:PropertyIsLike": {
            "@wildCard": "%",
            "@singleChar": "_",
            "@escapeChar": "\\",
            "ogc:PropertyName": "csw:AnyText",
            "ogc:Literal": "foo"
         }
     }
}

Related Issue / Discussion

Additional Information

Contributions and Licensing

(as per https://github.com/geopython/pycsw/blob/master/CONTRIBUTING.rst#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pycsw. I confirm that my contributions to pycsw will be compatible with the pycsw license guidelines at the time of contribution.
  • I have already previously agreed to the pycsw Contributions and Licensing Guidelines

@tomkralidis
Copy link
Member Author

Note: simple example implementation in https://gist.github.com/tomkralidis/6919d32da01b62b5b4e76b9254751e9b

@kalxas kalxas merged commit 270cd62 into geopython:master May 30, 2017
@tomkralidis tomkralidis deleted the fes-dict branch May 30, 2017 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants