OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

oslc-core message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (OSLCCORE-134) literal_value of the oslc_where syntax is not well-defined


    [ https://issues.oasis-open.org/browse/OSLCCORE-134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=68050#comment-68050 ] 

David Honey commented on OSLCCORE-134:
--------------------------------------

I agree the description of literals could be improved. The spec also needs to cover tools whose persistence is relational database rather than RDF based and queried with SQL versus one that explicitly persists RDF content and is queried with SPARQL.

I think the intent in the original spec was to be flexible. 

For booleans, accept values of true, "true", "true"^^xsd:boolean for true, and false, "false", and "false"^^xsd:boolean for false. Whether an implementation accepts some other forms such as "T" for True and "F" for false (such as Java's Boolean.valueOf(String)) ought to left undefined.

If a property is an integer, the OSLC property for it in a resource shape will use xsd:integer and not xsd:decimal or xsd:int. So the query parser ought to accept values such as 42, "42", "42"^^xsd:integer, "42"^^xsd:int for the integer value 42. However, should it also accept "42"^^xsd:decimal? I would expect values such as 42.1, "42.1", "42.1"^^xsd:float, "42.1"^^xsd:decimal to be rejected as invalid integer values. However, the behaviour needs to be defined. In SPARQL, a query graph against a typed litreral of "42"^^xsd:int probably won't match an "xsd:decimal", whereas a query based on SQL might attempt to extract an integer value from an integer string and perform a query against an integer column in a table.

OSLC Core supports literal values of:

xsd:decimal
    A decimal number.
xsd:double
    A double precision floating point number.
xsd:float
    A single precision floating point number.
xsd:integer
    An integer.

I think the query specification should describe, where possible, which forms can be found with which query literal values. This might be implementation dependent. For example, should the value 42.1 match a literal value of "42.1"^^xsd:decimal and "42.1"^^xsd:float?

> literal_value of the oslc_where syntax is not well-defined
> ----------------------------------------------------------
>
>                 Key: OSLCCORE-134
>                 URL: https://issues.oasis-open.org/browse/OSLCCORE-134
>             Project: OASIS OSLC Lifecycle Integration Core (OSLC Core) TC
>          Issue Type: Bug
>          Components: Query
>            Reporter: Andrii Berezovskyi
>            Assignee: David Honey
>
> The spec is not clear on how to interpret the literals w/o the xsd data type.
> E.g.
> The terms boolean and decimal are short forms for typed literals. For example, true is a short form for "true"^^xsd:booleancode>, 42 is a short form for "42"^^xsd:integer and 3.14159 is a short form for "3.14159"^^xsd:decimal.
> does not specify how I am supposed to know whether 42 is an integer but 3.14 is a decimal (or a single-precision float?), let alone how I am supposed to ensure that 'true' is a boolean True, not a "true" string literal.



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]