Opened 3 years ago

Closed 3 years ago

#579 closed defect (fixed)

header comment in GML response

Reported by: pbaumann Owned by: pcampalani
Priority: minor Milestone: 9.0.x
Component: petascope Version: development
Keywords: Cc:
Complexity: Trivial

Description

The header of any GML returned by petascope contains the standard source code text:

...etc.

First, this should read "rasdaman". Second, a phrasing should be found which is more meaningful for the client receiving such a file.

@Piero: let's work on this jointly.

Change History (7)

comment:1 Changed 3 years ago by pcampalani

Ok.
Linked tickets:

  • #307 : petascope URL path to be rasdaman/
  • #536 : outdated licence headers
  • #580 : SOAP duplicate licence header

comment:2 Changed 3 years ago by pcampalani

First little step: Netbeans to automatically insert the license on new files (little help for devs) : changeset:feedb1c.

comment:3 Changed 3 years ago by pcampalani

  • Status changed from new to accepted

comment:4 Changed 3 years ago by pcampalani

Peter,
I am working on this ticket. This is the header that I am going to use:

<!--
 * This file is part of rasdaman community.
 *
 * Rasdaman community is free software: you can redistribute it and/or modify
 * it under the terms of the GNU  General Public License as
 * published by the Free Software Foundation, either version 3 of
 * the License, or (at your option) any later version.
 *
 * Rasdaman community is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU  General Public License for more details.
 *
 * You should have received a copy of the GNU  General Public
 * License along with rasdaman community. If not, see "http://www.gnu.org/licenses/".
 *
 * Copyright 2003 - 2014 Peter Baumann / rasdaman GmbH.
 *
 * For more information please see "http://www.rasdaman.org"
 * or contact Peter Baumann via <baumann@rasdaman.com>
-->

If you want to update this, let me know.
Btw, only GetCoverage reponses carry this header: description and capabilities are serialized on the first extracted root element, which excludes the licence comment.

comment:5 Changed 3 years ago by pbaumann

looks good to me. From what I understand about OS IPR only files in the repo need to be marked (or have some README / LICENCE file in the same directory, but for output generated dynamically this is not necessary.

comment:7 Changed 3 years ago by pcampalani

  • Resolution set to fixed
  • Status changed from accepted to closed

Yes,
all Java license headers are now same and equal to: browser:applications/petascope/nbproject/licenseheader.txt, which is now also the Netbeans template header of newly created classes.

I created a script to a quick update of Java headers here, for instance, in 2015 the license will change to include 2015 in the copyright time range.

To do this, update the licenseheader.txt then run:

$ cd ./applications/petascope
$ ./replace_license_headers.sh --missing-headers all

Thanks to this script, I also found a few files whose license was missing.

Full options set:

$ ./replace_license_headers.sh --help

  replace_license_headers.sh [--java-root-folder folder] [-f header_file] [--missing-headers {all|none}] [--no-git-stage] [-v] [--help]

    --java-root-folder
        Specify root folder where to seek the java files (default is ./src/main/java/petascope).

    -f
        Specify path to file containing header (default is ./nbproject/licenseheader.txt).

    --missing-headers {all|none}
        Do not interact with user when headers are missing in a file: either add header for all or none of such files.

    --no-git-stage
        Do not automatically stage changes to git index.

    -v
        Verbose output.

    --help
        Print this information.

Licenses are also not delivered in the WC*S responses now: actually they were only delivered in GetCoverage responses, while capabilities document and coverage descriptions were not (they extract the root element -- excluding the header in the source file -- and serialize it). This fixes ticket #580 too, since the duplicate header in SOAP responses is now dropped.

This fix resolves also ticket #536: now 2003-2014 is the range for all licenses.

All of this is meant to Java files in Petascope only: to address the issue on other parts of the repo, please spawn new tickets from here.

Note: See TracTickets for help on using tickets.