How to do the mapping for my own current database?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

How to do the mapping for my own current database?

yeni
Hi all,

I have deployed SOS successfully and I also saw 52 north has its own database structure. I also read related documentation (hibernate.. database model and so on)and have a look of mapping files in [TOMCAT_HOME]/webapps/52n-sos-webapp/WEB-INF/classes/mapping, but I still have no idea that how to do the mapping of my current database to 52north database because they are totally different structure.

Can anybody give me a hand?

Thank you so much.
Reply | Threaded
Open this post in threaded view
|

Re: How to do the mapping for my own current database?

Henning Bredel-5
Hey Yeni,

the mapping layer is exactly for those cases when a database model is
different from the SOS model. However, to give a helping hand it is
essential to know the kind of data you want to server, the actual user
domain and use case you have to follow, and the actual database model
what is available.

To put it simple: Map the properties of each entity in a mapping file to
those tables/columns in your database you think would match best the SOS
concepts. If you are not sure, just check SOS documentation. If you are
unsure about what would be a good match, feel free to ask.

As you said, you already read related documentation it would be good to
come up with a concrete question.

Hope this helps.

   Henning

On 09.11.2016 17:57, yeni wrote:

> Hi all,
>
> I have deployed SOS successfully and I also saw 52 north has its own
> database structure. I also read related documentation (hibernate.. database
> model and so on)and have a look of mapping files in
> [TOMCAT_HOME]/webapps/52n-sos-webapp/WEB-INF/classes/mapping, but I still
> have no idea that how to do the mapping of my current database to 52north
> database because they are totally different structure.
>
> Can anybody give me a hand?
>
> Thank you so much.
>
>
>
> --
> View this message in context: http://sensorweb.forum.52north.org/How-to-do-the-mapping-for-my-own-current-database-tp4028721.html
> Sent from the 52° North - Sensor Web Community Forum mailing list archive at Nabble.com.
> _______________________________________________
> SWE mailing list
> [hidden email]
> http://list.52north.org/mailman/listinfo/swe
> http://sensorweb.forum.52north.org
> Please respect our mailing list guidelines:
> http://52north.org/resources/mailing-lists-and-forums/guidelines

_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

bar vs. line-plot in JS-Client

Scholten, Daniel
Dear all,

I wonder how to influence the plotting-style of the JS-Client.

Sometimes it plots bars, sometimes a line (see attached screenshots). The only difference in the corresponding databases I can figure out is, that with the line-plotted data there are some additional tables filled (these are: observationconstellation and some offering-related tables). Within the JS-Client I don't find any setting to make it plotting bars or lines. Within the database-documentation I didn't find any table to store that information, what is somehow expectable since no WaterML-specific attributes are implemented (as far as I know). For both screenshots I used the JS-Client coming with the 52n-sos-webapp##4.3.7.war bundle, I just changed the data-directory of the underlying PostgreSQL-database.

Thanks in advance for any suggestion!
Best wishes
Daniel Scholten
__________________________________________________
Daniel Scholten

Niersverband
Stabsstelle Informations- und Modelltechnik (IMT)
Sachbereich Softwaretechnik
Am Niersverband 10
41747 Viersen

Tel.: +49 2162 3704 - 460 [(Sekretariat: - 101)]
Fax: +49 2162 3704 - 444
E-Mail: [hidden email]

Körperschaft des öffentlichen Rechts, Sitz: Viersen
Vorsitzender des Verbandsrates: Rolf A. Königs, Vorstand: Prof. Dr.-Ing. Dietmar Schitthelm



_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines

screenshot_bars.PNG (112K) Download Attachment
screenshot_line.PNG (110K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: bar vs. line-plot in JS-Client

Henning Bredel-2

Daniel,

the REST API optionally provides rendering hints what style a graph is renderd best.

This is kind of information a data provider should know best so it is configurable for either each series itself or all series belonging to a specific phenomenon.

In versions before 2.x (not released yet) these infos are part of the timeseries resource when corresponding query parameters are set. We refined that mechanism, however, to settle such extra infos in an /extras sub resource.

How everything works exactly can be found in the documentation here

  http://52north.github.io/series-rest-api/

If anything is missing or unclear, please let me know.

Best

  Henning


Am 10.11.2016 16:14 schrieb "Scholten, Daniel" <[hidden email]>:
Dear all,

I wonder how to influence the plotting-style of the JS-Client.

Sometimes it plots bars, sometimes a line (see attached screenshots). The only difference in the corresponding databases I can figure out is, that with the line-plotted data there are some additional tables filled (these are: observationconstellation and some offering-related tables). Within the JS-Client I don't find any setting to make it plotting bars or lines. Within the database-documentation I didn't find any table to store that information, what is somehow expectable since no WaterML-specific attributes are implemented (as far as I know). For both screenshots I used the JS-Client coming with the 52n-sos-webapp##4.3.7.war bundle, I just changed the data-directory of the underlying PostgreSQL-database.

Thanks in advance for any suggestion!
Best wishes
Daniel Scholten
__________________________________________________
Daniel Scholten

Niersverband
Stabsstelle Informations- und Modelltechnik (IMT)
Sachbereich Softwaretechnik
Am Niersverband 10
41747 Viersen

Tel.: <a href="tel:%2B49%202162%203704%20-%20460" value="+4921623704460">+49 2162 3704 - 460 [(Sekretariat: - 101)]
Fax: <a href="tel:%2B49%202162%203704%20-%20444" value="+4921623704444">+49 2162 3704 - 444
E-Mail: Scholten.Daniel@Niersverband.de

Körperschaft des öffentlichen Rechts, Sitz: Viersen
Vorsitzender des Verbandsrates: Rolf A. Königs, Vorstand: Prof. Dr.-Ing. Dietmar Schitthelm



_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines

_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: bar vs. line-plot in JS-Client

Scholten, Daniel

Dear Henning,

 

thanks for the quick response.

 

I don’t do REST-calls on my own, I am using the JS-Client (coming with the 52n-sos-webapp##4.3.7.war bundle). The JS-Client sometimes shows bars and sometimes lines. Is there a way to tell the JS-Client how to plot the data (or how to set the style-parameter in its REST-calls)?

 

Thanks

Daniel

__________________________________________________

Daniel Scholten

Stabsstelle Informations- und Modelltechnik (IMT)

Sachbereich Softwaretechnik

 

Durchwahl: - 460

E-Mail: [hidden email]

 

Von: SWE [mailto:[hidden email]] Im Auftrag von Henning Bredel
Gesendet: Freitag, 11. November 2016 06:21
An: Mailinglist SWE
Betreff: Re: [52N SWE] bar vs. line-plot in JS-Client

 

Daniel,

the REST API optionally provides rendering hints what style a graph is renderd best.

This is kind of information a data provider should know best so it is configurable for either each series itself or all series belonging to a specific phenomenon.

In versions before 2.x (not released yet) these infos are part of the timeseries resource when corresponding query parameters are set. We refined that mechanism, however, to settle such extra infos in an /extras sub resource.

How everything works exactly can be found in the documentation here

  http://52north.github.io/series-rest-api/

If anything is missing or unclear, please let me know.

Best

  Henning

 

Am 10.11.2016 16:14 schrieb "Scholten, Daniel" <[hidden email]>:

Dear all,

I wonder how to influence the plotting-style of the JS-Client.

Sometimes it plots bars, sometimes a line (see attached screenshots). The only difference in the corresponding databases I can figure out is, that with the line-plotted data there are some additional tables filled (these are: observationconstellation and some offering-related tables). Within the JS-Client I don't find any setting to make it plotting bars or lines. Within the database-documentation I didn't find any table to store that information, what is somehow expectable since no WaterML-specific attributes are implemented (as far as I know). For both screenshots I used the JS-Client coming with the 52n-sos-webapp##4.3.7.war bundle, I just changed the data-directory of the underlying PostgreSQL-database.

Thanks in advance for any suggestion!
Best wishes
Daniel Scholten
__________________________________________________
Daniel Scholten

Niersverband
Stabsstelle Informations- und Modelltechnik (IMT)
Sachbereich Softwaretechnik
Am Niersverband 10
41747 Viersen

Tel.: <a href="tel:%2B49%202162%203704%20-%20460">+49 2162 3704 - 460 [(Sekretariat: - 101)]
Fax: <a href="tel:%2B49%202162%203704%20-%20444">+49 2162 3704 - 444
E-Mail: [hidden email]

Körperschaft des öffentlichen Rechts, Sitz: Viersen
Vorsitzender des Verbandsrates: Rolf A. Königs, Vorstand: Prof. Dr.-Ing. Dietmar Schitthelm



_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines


_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: bar vs. line-plot in JS-Client

Henning Bredel-5
Hey Daniel,

the SOS bundle version ships the REST API. Therefore you should be able
to configure the rendering hints. Have a look into the

   WEB-INF/classes/rendering-hints.json (or similar)

Here you can adjust the hints for a series id, or phenomenon id. A
series configuration overrides a phenomenon configuration if that
matches the phenomenon of the series.

Best

   Henning



On 11.11.2016 10:45, Scholten, Daniel wrote:

> Dear Henning,
>
>
>
> thanks for the quick response.
>
>
>
> I don’t do REST-calls on my own, I am using the JS-Client (coming with
> the 52n-sos-webapp##4.3.7.war bundle). The JS-Client sometimes shows
> bars and sometimes lines. Is there a way to tell the JS-Client how to
> plot the data (or how to set the style-parameter in its REST-calls)?
>
>
>
> Thanks
>
> Daniel
>
> __________________________________________________
>
> Daniel Scholten
>
> Stabsstelle Informations- und Modelltechnik (IMT)
>
> Sachbereich Softwaretechnik
>
>
>
> Durchwahl: - 460
>
> E-Mail: [hidden email]
> <mailto:[hidden email]>
>
>
>
> *Von:*SWE [mailto:[hidden email]] *Im Auftrag von *Henning Bredel
> *Gesendet:* Freitag, 11. November 2016 06:21
> *An:* Mailinglist SWE
> *Betreff:* Re: [52N SWE] bar vs. line-plot in JS-Client
>
>
>
> Daniel,
>
> the REST API optionally provides rendering hints what style a graph is
> renderd best.
>
> This is kind of information a data provider should know best so it is
> configurable for either each series itself or all series belonging to a
> specific phenomenon.
>
> In versions before 2.x (not released yet) these infos are part of the
> timeseries resource when corresponding query parameters are set. We
> refined that mechanism, however, to settle such extra infos in an
> /extras sub resource.
>
> How everything works exactly can be found in the documentation here
>
>   http://52north.github.io/series-rest-api/
>
> If anything is missing or unclear, please let me know.
>
> Best
>
>   Henning
>
>
>
> Am 10.11.2016 16:14 schrieb "Scholten, Daniel"
> <[hidden email] <mailto:[hidden email]>>:
>
> Dear all,
>
> I wonder how to influence the plotting-style of the JS-Client.
>
> Sometimes it plots bars, sometimes a line (see attached screenshots).
> The only difference in the corresponding databases I can figure out is,
> that with the line-plotted data there are some additional tables filled
> (these are: observationconstellation and some offering-related tables).
> Within the JS-Client I don't find any setting to make it plotting bars
> or lines. Within the database-documentation I didn't find any table to
> store that information, what is somehow expectable since no
> WaterML-specific attributes are implemented (as far as I know). For both
> screenshots I used the JS-Client coming with the
> 52n-sos-webapp##4.3.7.war bundle, I just changed the data-directory of
> the underlying PostgreSQL-database.
>
> Thanks in advance for any suggestion!
> Best wishes
> Daniel Scholten
> __________________________________________________
> Daniel Scholten
>
> Niersverband
> Stabsstelle Informations- und Modelltechnik (IMT)
> Sachbereich Softwaretechnik
> Am Niersverband 10
> 41747 Viersen
>
> Tel.: +49 2162 3704 - 460 <tel:%2B49%202162%203704%20-%20460>
> [(Sekretariat: - 101)]
> Fax: +49 2162 3704 - 444 <tel:%2B49%202162%203704%20-%20444>
> E-Mail: [hidden email]
> <mailto:[hidden email]>
>
> Körperschaft des öffentlichen Rechts, Sitz: Viersen
> Vorsitzender des Verbandsrates: Rolf A. Königs, Vorstand: Prof. Dr.-Ing.
> Dietmar Schitthelm
>
>
>
> _______________________________________________
> SWE mailing list
> [hidden email] <mailto:[hidden email]>
> http://list.52north.org/mailman/listinfo/swe
> http://sensorweb.forum.52north.org
> Please respect our mailing list guidelines:
> http://52north.org/resources/mailing-lists-and-forums/guidelines
>
>
>
> _______________________________________________
> SWE mailing list
> [hidden email]
> http://list.52north.org/mailman/listinfo/swe
> http://sensorweb.forum.52north.org
> Please respect our mailing list guidelines:
> http://52north.org/resources/mailing-lists-and-forums/guidelines
>
_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: How to do the mapping for my own current database?

yeni
In reply to this post by Henning Bredel-5
Thanks.

I think I am still getting stuck in the mapping. Refer to the official document, I know some columns in my database should do the mapping, but not quite sure how to do it exactly. Maybe I can provide the schema here and we can discuss more about the mapping?

Really appreciate for your help.

Yeni
Reply | Threaded
Open this post in threaded view
|

Re: How to do the mapping for my own current database?

Carsten Hollmann
Hi Yeni,

> Maybe I can provide the schema here and we
> can discuss more about the mapping?
Yes, sure. You can provide your schema here and we will have a look at
it and give you some hints how to map your schema to the SOS database
schema.

Best,
Carsten
_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: How to do the mapping for my own current database?

yeni
Thanks Carsten,

Here is one of my schema. Let me explain some basic information about schema. We have several databases not only smb_halifax, also have smb_saint_John and so on, because there are several stations hence we put them into different databases. But their structure are almost same.

Thanks a lot.

Reply | Threaded
Open this post in threaded view
|

Re: How to do the mapping for my own current database?

Carsten Hollmann
Hi Yeni,

your database schema is very different from the SOS schema, thus a
direct mapping would not work.

For example, in your met table you have several columns that are
separate "observabelProperty" in the SOS mapping and one row in your met
table should result in several SOS "observation".

I recommend to create (materialized) views from your data which
correspond to the SOS database schema.

Best,
Carsten
_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines