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

Support for generic attribute query parameters #628

Open
dirk-ecker opened this issue Nov 4, 2021 · 7 comments
Open

Support for generic attribute query parameters #628

dirk-ecker opened this issue Nov 4, 2021 · 7 comments

Comments

@dirk-ecker
Copy link

It would be nice if all entities would support generic query parameters corresponding with their result attributes or at least for selected attributes.

Here in example for the features entity

http:///helgoland-adapters-webapp/api/features?properties.domainId=Wupper-Talsperre_Ablauf,Wupper-Talsperre_Absperrbauwerk

gives me

{
        id: '7',
        properties: {
          label: 'Wupper-Talsperre, Ablauf',
          href: 'http://agro060.icg.kfa-juelich.de:1113/helgoland-adapters-webapp/api/features/7',
          domainId: 'Wupper-Talsperre_Ablauf'
        },
        type: 'Feature',
        geometry: { type: 'Point', coordinates: [Array], crs: [Object] }
      },
      {
        id: '71',
        properties: {
          label: 'Wupper-Talsperre, Absperrbauwerk',
          href: 'http://agro060.icg.kfa-juelich.de:1113/helgoland-adapters-webapp/api/features/71',
          domainId: 'Wupper-Talsperre_Absperrbauwerk'
        },

or am I missing something and this is already possible?

Another good alternative would be https://graphql.org, that supports a rich query language.

Thanks in advance for your response.

@CarstenHollmann
Copy link

You can already query the feature by their domainID using the features and matchDomainIds parameters. Here is an example request:

http:///helgoland-adapters-webapp/api/features?features=Wupper-Talsperre_Ablauf,Wupper-Talsperre_Absperrbauwerk&matchDomainIds=true

@dirk-ecker dirk-ecker reopened this Nov 5, 2021
@CarstenHollmann
Copy link

This is supported in the Helgoland-API version 2.x and 3.x.

@dirk-ecker
Copy link
Author

Okay, we use 3.5 so this should work.
How is this done in the source? I can find isMatchDomainIds, but only the declaration of the method, not the use. Seems to be generic magic or ...?

@dirk-ecker
Copy link
Author

My colleague found out that this does not work because the parameter is converted to lowercase. So it searches for wupper-talsperre_ablauf,wupper-talsperre_absperrbauwerk instead of Wupper-Talsperre_Ablauf,Wupper-Talsperre_Absperrbauwerk.

Ist this intended or a bug?

@CarstenHollmann
Copy link

This is intended but it seems that there is an issue in the used sensorweb-server-dao-impl version. I have tested the current version and with this the filtering on the domainIds works.

@CarstenHollmann
Copy link

There is a new Sensor Web Server Helgoland Adapters version available where the filtering on domainIds works.

@dirk-ecker
Copy link
Author

@CarstenHollmann Thank you.

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

No branches or pull requests

2 participants