You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sis.apache.org by phuong hao nguyen thi <ng...@gmail.com> on 2018/05/13 03:17:56 UTC

Re: Google Summer of Code 2018 : Implement OGC Catalog Service for the Web (CSW)

Hello Martin and all,
I  tried clean and build web service layer  but have error , I think error
from dependency in the pom.xml .
So Can I edit pom.xml file in sis-webapp ? or I create a new package ? .
And my code , Will I push directly to the  SIS or I create a new repository
for the SIS in my github ?

This is CSW design architecture model v2.0.2 that I will use to develop csw
service : . (Note : It is still incomplete I will update in my work process)
https://docs.google.com/document/d/1GrKRMCbOaaQw2ic4NYBX4QsczbR7n_rJevGyj4yBzgo/edit?usp=sharing

*My reference source : *
OpenGIS Catalogue Service Implementation Specification
<http://portal.opengeospatial.org/files/?artifact_id=20555>
http://portal.opengeospatial.org/files/?artifact_id=20555
OGC Web Service Common Implementation Specification
<http://portal.opengeospatial.org/files/?artifact_id=38867>
http://portal.opengeospatial.org/files/?artifact_id=38867
UML to java mapping
http://docs.geotools.org/latest/javadocs/org/opengis/annotation/doc-files/UML-Java.html

The first I will developing REST service on the server-side  and I am
starting with GetCapabilities operation.
And in the learning process I see in UML (getCapabilities request parameter
) have a (CostList)  Sections  ,  Can you explain this part ? and How I can
extends CostList in java ? (can you give me a example ?)

Thanks so much
Hao

On Thu, Apr 26, 2018 at 3:26 PM, Martin Desruisseaux <
martin.desruisseaux@geomatys.com> wrote:

> Le 26/04/2018 à 08:59, phuong hao nguyen thi a écrit :
>
> > I'm instaling GeoAPI but it have a error java version : " Detected JDK
> > version 1.8.0-171 is not in the allowed range 10 "
> >
> As the message said, GeoAPI requires Java 10 for compilation. Note
> however that this is only for compilation; the compiled classes are
> still compatible with Java 7. The reason for requiring Java 10 at build
> time is for improved Javadoc generation, in part with some new options
> available only in Java 10.
>
>     Martin
>
>
>

Re: Google Summer of Code 2018 : Implement OGC Catalog Service for the Web (CSW)

Posted by Martin Desruisseaux <ma...@geomatys.com>.
Le 14/05/2018 à 22:50, Martin Desruisseaux a écrit :

> git show 2cc8c05 > commit1.patch git show 144b5b4 > commit3.patch
>
Sorry, this is supposed to be on two lines (formatting issue with my email):

git show 2cc8c05 > commit1.patch

git show 144b5b4 > commit3.patch

    Martin



Re: Google Summer of Code 2018 : Implement OGC Catalog Service for the Web (CSW)

Posted by Martin Desruisseaux <ma...@geomatys.com>.
Hello Hao

Le 14/05/2018 à 12:39, phuong hao nguyen thi a écrit :

> I created a new repository in git :
> https://github.com/haonguyen123/SIS-GSOC2018
> Can you check for me it ok ?

I think it would have been easier to use the "Fork" button on
https://github.com/apache/sis. The result would have been the same, but
git would "remember" that the code come from Apache SIS, which would
make the merges easier.

If you want, you can try to fix as below. First save your changes:

    git show 2cc8c05 > commit1.patch git show 144b5b4 > commit3.patch

Then you can delete the SIS-GSOC2018 clone by clicking on the "settings"
tab, and "delete" somewhere close to the bottom of the page.

Next you can go on https://github.com/apache/sis and click on "Fork". I
think that you can reuse SIS-GSOC2018 for the name of your fork if you
wish. Then:

    cd SIS-GSOC2018
    git checkout JDK8
    patch -p1< commit1.patch patch -p1 <commit3.patch

The two "patch" instructions apply the changes that you saved
previously. You may need to use a more complete path for the
"commit?.patch" files. Next you can commit and push.

    Martin



Re: Google Summer of Code 2018 : Implement OGC Catalog Service for the Web (CSW)

Posted by phuong hao nguyen thi <ng...@gmail.com>.
Hello Martin,
Thanks you so much
> SIS still use Subversion, so work on GitHub can not yet be pushed
> directly to SIS. I suggest to temporarily create a new repository on
> GitHub for now; we may have better alternatives later.

I created a new repository in git :
https://github.com/haonguyen123/SIS-GSOC2018
Can you check for me it ok ?

>  Would it be possible to use version 3 instead than 2? I think they have
> not too many changes.

Because I also think they have not too many changes and I see in the
document 2.0.2 is more detail.  Yes , So I will change to version 3 :)

Thanks
Hao

On Mon, May 14, 2018 at 4:15 AM, Martin Desruisseaux <
martin.desruisseaux@geomatys.com> wrote:

> Hello Hao
>
> Le 13/05/2018 à 05:17, phuong hao nguyen thi a écrit :
>
> > I tried clean and build web service layer but have error, I think
> > error from dependency in the pom.xml. So Can I edit pom.xml file in
> > sis-webapp ? or I create a new package ?
> >
> I suggest to stay in the sis-webapp module and edit the pom.xml file as
> needed. I think that the web application currently in sis-webapp does
> not work any more. Maybe it could be fixed, but since that old
> application does not follow OGC standard, I think we can replace it by
> your work.
>
>
> > And my code, Will I push directly to the SIS or I create a new
> > repository for the SIS in my github?
> >
> SIS still use Subversion, so work on GitHub can not yet be pushed
> directly to SIS. I suggest to temporarily create a new repository on
> GitHub for now; we may have better alternatives later.
>
>
> > This is CSW design architecture model v2.0.2 that I will use to develop
> csw
> > service: (Note : It is still incomplete I will update in my work process)
> > https://docs.google.com/document/d/1GrKRMCbOaaQw2ic4NYBX4QsczbR7n
> _rJevGyj4yBzgo/edit?usp=sharing
> >
> > My reference source:
> > OpenGIS Catalogue Service Implementation Specification
> > http://portal.opengeospatial.org/files/?artifact_id=20555
>
> This is the specification version 2.0.2. There is a version 3.0 there:
>
>   * http://docs.opengeospatial.org/is/12-168r6/12-168r6.html
>   * http://docs.opengeospatial.org/is/12-176r7/12-176r7.html
>
> Would it be possible to use version 3 instead than 2? I think they have
> not too many changes.
>
>
> > OGC Web Service Common Implementation Specification
> > http://portal.opengeospatial.org/files/?artifact_id=38867
> > UML to java mapping
> > http://docs.geotools.org/latest/javadocs/org/opengis/
> annotation/doc-files/UML-Java.html
>
> The later reference can be replaced by
> http://www.geoapi.org/3.0/javadoc/UML-Java.html, which is actually the
> original source. However this mapping needs to be updated. I suggest the
> following changes:
>
>   * DateTime: java.time.ZonedDateTime instead than java.util.Date. The
>     java.time package is new in Java 8 and replace the old
>     java.util.Date class.
>   * Scale, Length, Angle and Measure:
>     javax.measure.quantity.Dimensionless, Length, Angle and Quantity<?>.
>   * Record and RecordType: org.opengis.util.Record and RecordType.
>
>
> > The first I will developing REST service on the server-side and I am
> > starting with GetCapabilities operation.
> >
> Cool!
>
>
> > And in the learning process I see in UML (getCapabilities request
> > parameter) have a (CostList) Sections, Can you explain this part ? and
> > How I can extends CostList in java ? (can you give me a example?)
> >
> A CodeList is very similar to java.lang.Enum with one difference: it can
> be extended (i.e. users can add their own items at runtime). CodeList
> are very common in OGC/ISO standards, but do not exist in the standard
> Java library. For this reason we extend a CodeList class provided by
> GeoAPI.
>
> According http://docs.opengeospatial.org/is/12-176r7/12-176r7.html#44,
> the Section code list can take the following values (before users add
> their own items if they want): "ServiceIdentification",
> "ServiceProvider", "OperationsMetadata", "Filter_Capabilities". This can
> be defined in Java like below (Note: the OGC_12_176 constant does not
> yet exist in GeoAPI; I will add it):
>
>     @UML(identifier="Section", specification=OGC_12_176)
>     public final class Section extends CodeList<Section> {
>         private static final List<Section> VALUES = new ArrayList<>(5);
>
>         @UML(identifier="ServiceIdentification", obligation=CONDITIONAL,
> specification=OGC_12_176)
>         public static final Section SERVICE_IDENTIFICATION = new
> Section("IDENTIFICATION");
>
>         // ... add other constants
>
>         private Section(final String name) {
>             super(name, VALUES);
>         }
>     }
>
> You can see code list in GeoAPI for more code, javadoc, etc. For example
> you may look at org.opengis.metadata.citation.Role.
>
> Have a nice first official day at GSoC 2018!
>
>     Martin
>
>
>

Re: Google Summer of Code 2018 : Implement OGC Catalog Service for the Web (CSW)

Posted by Martin Desruisseaux <ma...@geomatys.com>.
Hello Hao

Le 13/05/2018 à 05:17, phuong hao nguyen thi a écrit :

> I tried clean and build web service layer but have error, I think
> error from dependency in the pom.xml. So Can I edit pom.xml file in
> sis-webapp ? or I create a new package ?
>
I suggest to stay in the sis-webapp module and edit the pom.xml file as
needed. I think that the web application currently in sis-webapp does
not work any more. Maybe it could be fixed, but since that old
application does not follow OGC standard, I think we can replace it by
your work.


> And my code, Will I push directly to the SIS or I create a new
> repository for the SIS in my github?
>
SIS still use Subversion, so work on GitHub can not yet be pushed
directly to SIS. I suggest to temporarily create a new repository on
GitHub for now; we may have better alternatives later.


> This is CSW design architecture model v2.0.2 that I will use to develop csw
> service: (Note : It is still incomplete I will update in my work process)
> https://docs.google.com/document/d/1GrKRMCbOaaQw2ic4NYBX4QsczbR7n_rJevGyj4yBzgo/edit?usp=sharing
>
> My reference source:
> OpenGIS Catalogue Service Implementation Specification
> http://portal.opengeospatial.org/files/?artifact_id=20555

This is the specification version 2.0.2. There is a version 3.0 there:

  * http://docs.opengeospatial.org/is/12-168r6/12-168r6.html
  * http://docs.opengeospatial.org/is/12-176r7/12-176r7.html

Would it be possible to use version 3 instead than 2? I think they have
not too many changes.


> OGC Web Service Common Implementation Specification
> http://portal.opengeospatial.org/files/?artifact_id=38867
> UML to java mapping
> http://docs.geotools.org/latest/javadocs/org/opengis/annotation/doc-files/UML-Java.html

The later reference can be replaced by
http://www.geoapi.org/3.0/javadoc/UML-Java.html, which is actually the
original source. However this mapping needs to be updated. I suggest the
following changes:

  * DateTime: java.time.ZonedDateTime instead than java.util.Date. The
    java.time package is new in Java 8 and replace the old
    java.util.Date class.
  * Scale, Length, Angle and Measure:
    javax.measure.quantity.Dimensionless, Length, Angle and Quantity<?>.
  * Record and RecordType: org.opengis.util.Record and RecordType.


> The first I will developing REST service on the server-side and I am
> starting with GetCapabilities operation.
>
Cool!


> And in the learning process I see in UML (getCapabilities request
> parameter) have a (CostList) Sections, Can you explain this part ? and
> How I can extends CostList in java ? (can you give me a example?)
>
A CodeList is very similar to java.lang.Enum with one difference: it can
be extended (i.e. users can add their own items at runtime). CodeList
are very common in OGC/ISO standards, but do not exist in the standard
Java library. For this reason we extend a CodeList class provided by GeoAPI.

According http://docs.opengeospatial.org/is/12-176r7/12-176r7.html#44,
the Section code list can take the following values (before users add
their own items if they want): "ServiceIdentification",
"ServiceProvider", "OperationsMetadata", "Filter_Capabilities". This can
be defined in Java like below (Note: the OGC_12_176 constant does not
yet exist in GeoAPI; I will add it):

    @UML(identifier="Section", specification=OGC_12_176)
    public final class Section extends CodeList<Section> {
        private static final List<Section> VALUES = new ArrayList<>(5);

        @UML(identifier="ServiceIdentification", obligation=CONDITIONAL, specification=OGC_12_176)
        public static final Section SERVICE_IDENTIFICATION = new Section("IDENTIFICATION");

        // ... add other constants

        private Section(final String name) {
            super(name, VALUES);
        }
    }

You can see code list in GeoAPI for more code, javadoc, etc. For example
you may look at org.opengis.metadata.citation.Role.

Have a nice first official day at GSoC 2018!

    Martin