Skip to content
  1. Mar 02, 2018
    • gmantele's avatar
      [UWS] Fix the quote serialization. · 855a805b
      gmantele authored
      The UWS-1.x standard defines the quote as an ISO-8601 date. UWS-Lib stores it
      as a number of seconds (i.e. estimated job duration).
      
      This fix ensures that this integer/long quote value is returned as a date.
      
      Note: The backup and restoration processes are not affected by this change.
            The backup file format is still the same: a quote stored as a long value.
      855a805b
  2. Feb 26, 2018
    • gmantele's avatar
      [TAP] Change TAPLib's release number into 2.2. · 25a4376d
      gmantele authored
      25a4376d
    • gmantele's avatar
    • gmantele's avatar
      [UWS] Support the blocking behavior described in PR-UWS-1.1. · d2e5d98a
      gmantele authored
      It is possible to choose how the blocking mechanism should behave
      (e.g. what the max. waiting period, how many requests can be blocked
      in the same time, what happen when the blocking times out, ...).
      
      Indeed, the policy to apply must actually be an extension of the interface
      BlockingPolicy. Already two implementations are provided in the library
      (LimitedBlockingPolicy and UserLimitedBlockingPolicy), but a custom policy
      can perfectly be created and apply to a UWS service.
      
      By default, no policy is set. In such case, the service will block the time
      specified by the user, which may be -1 (i.e. wait indefinitely). A
      BlockingPolicy can help controlling the waiting/blocking process and protect
      the resources of the server.
      d2e5d98a
    • gmantele's avatar
      [UWS] Add PHASE, AFTER and LAST filters on a JobList. · f08018cb
      gmantele authored
      - PHASE: list only jobs in the specified PHASE. If this parameter is repeated
               jobs matching any of the specified phases will be returned.
      - AFTER: list jobs created after the specified ISO-8601 date (included).
               If this parameter is repeated, only the most recent date is retained.
      - LAST: list the N-th most recently created jobs, ordered by descending
              creation time
      
      These filter parameters are additive: their constraints are joint as with an
      AND operator (except for PHASE parameters ; see above).
      
      If no filter is specified, all jobs EXCEPT the ARCHIVED ones are listed. The
      only way to list ARCHIVED jobs is to use PHASE=ARCHIVED (with or without other
      filter parameters).
      
      The filtering API has been made in a generic manner so that it is easily
      possible to create and add new filters. See the interface JobFilter and the
      class JobListRefined for more details.
      f08018cb
    • gmantele's avatar
      [UWS] Add 3 job destruction policies: ALWAYS_DELETE (default), ARCHIVE_ON_DATE · f3954c71
      gmantele authored
      and ALWAYS_ARCHIVE.
      
      When archiving a job, its former phase is stored in jobInfo under the name
      'oldPhase' if no jobInfo is already set.
      
      Archiving a job means that all input files and results are destroyed ; the
      error summary and jobInfo (even if it is a file) are kept.
      
      Each archive operation ends with a log message ; in ERROR if failed or in
      INFO if successful.
      
      This commit also includes the following things:
      
          - reformat on 80 characters width the Javadoc of all modified classes
      
      	- fix a bug with the phase transitions: since it is not possible any more
      	  to go from PENDING to EXECUTING directly, UWSJob.start(...) must first
      	  ensure to be on QUEUED phase. This bug has also been fixed in TAPJob.
      	  Similarly, before going into ARCHIVED phase the job must be set into
      	  ABORTED phase if not already in a final phase.
      f3954c71
    • gmantele's avatar
      [UWS] Add the new Execution Phase `ARCHIVED` and check phase transitions. · 0467dbb1
      gmantele authored
      A JUnit test case has been added in order to check that all possible phase
      transitions are respecting the UWS-1.1 standard. However, there is anyway
      a bit more freedom for some of them:
      
          - it is possible to go to and come from UNKNOWN at any time, whatever is
      	  the source or target phase.
      
      	- it is possible to go to ERROR or ABORTED from the phases HELD and
      	  SUSPENDED. This fact was not specified in the State Machine figure of the
      	  UWS standard but the following sentence at section
      	  "2.1.3 Execution Phase" (page 7) should allow that:
      	  "At any time before the COMPLETED phase a job may either be ABORTED or
      	   may suffer an ERROR."
      
      	- the UWS-1.1 document has an inconsistency about the HELD phase. At
      	  section "2.1.3 Execution Phase" (page 7), the following sentence implies
      	  that it is only possible to go to HELD from PENDING (because it would not
      	  be possible to queue the job). And so, when PHASE=RUN is sent by the UWS
            client, if now possible, the job should go in phase QUEUED. However the
      	  State Machine figure suggests that it is possible to go to HELD only from
      	  EXECUTING and that a PHASE=RUN would make the job go back to EXECUTING (if
      	  now possible). Because of this inconsistency, the UWSLibrary made possible
      	  the following transitions: PENDING/EXECUTING->HELD->QUEUED/EXECUTING.
      
      (note: a figure illustrating the phase transitions supported by the
             UWSLibrary-4.3 has been created in the directory `img` of the
      	   UWS-Tutorial website under the file name `state_machine.png`...which of
      	   course will be visible only when uwslib-4.3 will be released)
      
      Besides, this commit also include almost a full rewriting of the Javadoc of
      JobPhase and ExecutionPhase. The Javadoc of UWSJob has just been reformated
      so that comments do not exceed 80 (+2) characters. This reformating aims to
      improve the human reading of the Javadoc while looking at the source files ;
      however this should not affect much the HTML version of the Javadoc.
      0467dbb1
    • gmantele's avatar
      [UWS,TAP] Add the property 'creationTime' to a UWS (and so TAP as well) job. · a8d98f64
      gmantele authored
      This property is displayed in the XML and JSON serialization of a job item.
      It is also backuped and restored from a UWS backup file.
      
      /!\ WARNING: Small modification of the API! Since creationTime must be
                   set by the UWS service at creation of a job, this date must also
                   be imported at backup restoration. Hence the modification of the
                   interface uws.service.UWSFactory and its implementations
                   (particularly tap.AbstractTAPFactory). Similarly the class
                   uws.job.UWSJob and tap.job.TAPJob have underwent exactly the same
                   modification in one of their constructors.
      
      This commit also adds the new optional jobRef items: creationTime, runID and
      ownerID in the XML and JSON serializations.
      a8d98f64
    • gmantele's avatar
      [UWS] Add the UWS protocol version as attributes of the nodes <uws>, <jobs> and · 15f2fb81
      gmantele authored
      <job>.
      
      This commit also:
      
          - set the version of the UWS protocol to 1.1 (cf UWS.VERSION)
      	- add a static constant for the standardID (cf UWS.STANDARD_ID)
      	- add a xlink:type and xlink:href for jobListRef in the uws XML
      	- set the @version Javadoc attribute of all modified classes to 4.3
      	  (scheduled version of the UWSLibrary supporting UWS-1.1)
      15f2fb81
    • gmantele's avatar
      [UWS] Ensure optional MIME-type and size are set in the XML and JSON · 404db993
      gmantele authored
      serialization of all results if such information are available.
      
      This commit also fix few comments about the result's XML serialization.
      
      The processing of xlink:type of a result reference is made similar as the one of
      jobRef.
      404db993
    • gmantele's avatar
      [TAP] Add an optional parameter to a UDF property: the UDF description. · f6a089c1
      gmantele authored
      Although the Java code allowed the specification of a description of a User
      Defined Function, it was not possible to set one in the UDFs listed in the
      configuration file.
      f6a089c1
  3. Feb 22, 2018
  4. Feb 08, 2018
  5. Jan 31, 2018
  6. Jan 12, 2018
  7. Jan 11, 2018
  8. Jan 08, 2018
  9. Nov 30, 2017
  10. Nov 16, 2017
  11. Nov 10, 2017
    • gmantele's avatar
      [ADQL] Fix escaping of double quotes in delimited identifiers. · 239c7178
      gmantele authored
      A delimited identifier is any sequence of characters between a pair of
      double quotes. For instance: "123 I am a delimited identifier!".
      
      It is of course possible to have double quotes inside this kind of identifier,
      but they have to be doubled in order to not be mistaken with the end of the
      identifier. For instance: "Cool ""identifier""".
      
      However, this escape option was not taken into account by the ADQL library,
      though the same mechanism was already in place for string contants.
      239c7178
  12. Sep 27, 2017
    • gmantele's avatar
      [UWS] Fix missing xlink:type (though it is optional) in jobRef (in XML job list). · 6ad03a80
      gmantele authored
      This commit also includes the 2 following points:
      
          - for (really really tiny) optimisation purpose, replace String by a
      	  char when there is only one character to append to a StringBuffer
      
      	- add a bit more details about Result.type in the Javadoc (it should be
      	  a xlink:type and not a random custom type)
      6ad03a80
    • gmantele's avatar
      [UWS] Fix HTTP request for job destruction. · 81c567c8
      gmantele authored
      Until now, it was possible to destroy the job by posting ACTION=DELETE
      with a URL like below:
      
          {root-uws}/{job-list}/{job-id}/foo/bar
      
      That is completely wrong. The correct URL for this action must always be:
      
          {root-uws}/{job-list}/{job-id}
      
      This commit fixes this error in UWSServlet and UWSService.
      81c567c8
    • gmantele's avatar
      [UWS] Fix bug with the configuration of the destruction controller. · fdf1d1ea
      gmantele authored
      The configuration of the DestructionTimeController was never effective
      in the UWSServlet with a configuration file: the wrong instance was set.
      fdf1d1ea
    • gmantele's avatar
      [UWS] Fix bug with JobObserver. The notification of all observers was not · f7071abb
      gmantele authored
      synchronized although the collection of observers is synchronized (Vector) ;
      using an Iterator ensures the synchronization and avoids concurrency problems.
      f7071abb
    • gmantele's avatar
      [TAP,UWS] Add a protocol version number for UWS and TAP: · 70dc3a14
      gmantele authored
        - uws.service.UWS.VERSION  (static final)
        - tap.resource.TAP.VERSION (static final)
      
      Dealing with several protocol versions in the same time is quite difficult and
      may significantly alter the libraries API in an unstable way. That's why, for
      the TAP and UWS libraries, only one version is implemented (i.e. the last one).
      To use a older version of the protocol, one must use an older version of the
      corresponding library.
      
      About the versioning of the ADQL standard, there is no need to set any version
      number somewhere because a different ADQL version implies a different grammar.
      It means that a different parser is required for each ADQL version. For the
      moment, there is only one version, so no need to change anything to the ADQL
      library about ADQL version. Later, ADQLParser should become an interface and
      a factory will have to be used in order to get the parser corresponding to the
      desired ADQL version.
      70dc3a14
  13. Sep 26, 2017
    • gmantele's avatar
      [TAP] Auto-detect the RegTAP datamodel from the schemas and tables declared · 8102b083
      gmantele authored
      in TAP_SCHEMA.
      
      RegTAP is detected successfully if the schema 'rr' exists (case sensitive)
      and contains at least the following tables (names also case sensitive):
      	- capability
      	- interface
      	- intf_param
      	- relationship
      	- res_date
      	- res_detail
      	- res_role
      	- res_schema
      	- res_subject
      	- res_table
      	- resource
      	- table_column
      	- validation
      
      The table name can be prefixed by 'rr' (case sensitive) or not. For instance:
      'rr.capability' and 'capability' are both detected successfully.
      
      All these constraints (including the case sensitive one) are based on the
      requirements of the RegTAP-1.0 standard document. They are set in order
      to not declare the RegTAP DM by accident AND to provide a first low
      validation of the RegTAP schema and tables. Low validation because
      columns (as well as datatype, utypes, indices and UDF functions) are
      never checked.
      
      This commit resolves the GitHub issue #51
      8102b083
    • gmantele's avatar
    • gmantele's avatar
      [TAP] The additional table TAP_SCHEMA.coossys must not be be returned as a · 93c36a09
      gmantele authored
      standard table. The same for the additional column
      TAP_SCHEMA.columns.coosys_id.
      93c36a09
  14. Sep 25, 2017
  15. Sep 15, 2017
  16. Sep 13, 2017
    • gmantele's avatar
      [ADQL] Also append an HINT message in the ParseException message when a SQL · fe4c3e97
      gmantele authored
      reserved word is encountered instead of a column/table/schema name/alias.
      
      On the contrary to the previous commit, this time a list of SQL reserved words
      has been added into the ADQL grammar. In this way, the parser will ensure that
      no word of this list is used in an ADQL query. The raised error is then enriched
      of an HINT message stating that this word is part of SQL, is not supported
      by ADQL and must be written between double quotes if used as an identifier.
      
      The list of SQL reserved words comes from the ADQL-2.0 standard, after removal
      of all potentially used ADQL words, in order to avoid a conflict with the
      already existing tokens in the ADQL grammar.
      fe4c3e97