Request for RIF assistance from GeoSPARQL SWG

Dear RIF Dev Mailing list,

We, the GeoSPARQL Standards Working Group, are updating the OGC's GeoSPARQL
specification, first published in 2012 which we refer to as GeoSPARQL 1.0.
We wish to better present the specification in machine-readable form and to
update it producing GeoSPARQL 1.1.

GeoSPARQL 1.0 includes a template for a set of RIF rules [1]. We would like
to expand this template to produce a RIF artifact that can be included in
the set of GeoSPARQL 1.0 resources. We will also produce a GeoSPARQL 1.1
RIF artifact within the next few months.

Please could you assist us with the following points:

1. Validity of our 1.0 RIF document
    a. We have not been able to find any operating RIF validators listed by
the RIF WG [2] other than perhaps RIF4J [3]. Can you indicate others, in
particular, any that are online?
    b. Have any multi-format RIF validators been produced, specifically for
XML and Presentation Syntax?

2. Presentation of our 1.0 RIF document
    a. The Media Type "application/rif+xml" is indicated for use for RIF
documents [4] but it is not registered with IANA's Media Types list [5].
Can you clarify the status of the RIF Media Type?
    b. Assuming a RIF document in XML is to use the Media Type
"application/rif+xml" and the file extension ".rif", what should a
Presentation Syntax document use? Should it use ".rifps" for the file
extension, as per WG examples like [6] but then what Media Type?
    c. We intend to present the RIF artifacts for GeoSPARQL 1.0 and 1.1
online with persistent URIs that will resolve and communicate resource
Media Types via HTTP Content Negotiation. We could present multiple media
types for the same artifact (RIF in XML & Presentation Syntax). Does this
have precedent in the RIF community?

Next I include a snippet of our RIF document below. It is highly repetitive
so I have only included the first 2 ForAll elements.

----------
Document (
    Prefix (geo <http://www.opengis.net/ont/geosparql#>)
    Prefix (geof <http://www.opengis.net/def/function/geosparql/>)

    Group (
        # geo:sfEquals
        Forall ?f1 ?f2 ?g1 ?g2 ?g1Serial ?g2Serial (
            ?f1[geo:sfEquals->?f2] :-
            Or (
                # feature – feature rule
                And (
                    ?f1[geo:hasDefaultGeometry->?g1]
                    ?f2[geo:hasDefaultGeometry->?g2]
                    ?g1[geo:gmlLiteral->?g1Serial]
                    ?g2[geo:gmlLiteral->?g2Serial]
                    External(geof:sfEquals (?g1Serial,?g2Serial))
                )
                # feature – geometry rule
                And (
                    ?f1[geo:hasDefaultGeometry->?g1]
                    ?g1[geo:gmlLiteral->?g1Serial]
                    ?f2[geo:gmlLiteral->?g2Serial]
                    External(geof:sfEquals (?g1Serial,?g2Serial))
                )
                # geometry - feature rule
                And (
                    ?f2[geo:hasDefaultGeometry->?g2]
                    ?f1[geo:gmlLiteral->?g1Serial]
                    ?g2[geo:gmlLiteral->?g2Serial]
                    External(geof:sfEquals (?g1Serial,?g2Serial))
                )
                # geometry - geometry rule
                And (
                    ?f1[geo:gmlLiteral->?g1Serial]
                    ?f2[geo:gmlLiteral->?g2Serial]
                    External(geof:sfEquals (?g1Serial,?g2Serial))
                )
            )
        )

        # geo:sfEquals
        Forall ?f1 ?f2 ?g1 ?g2 ?g1Serial ?g2Serial (
            ?f1[geo:sfEquals->?f2] :-
            Or (
                # feature – feature rule
                And (
                    ?f1[geo:hasDefaultGeometry->?g1]
                    ?f2[geo:hasDefaultGeometry->?g2]
                    ?g1[geo:wktLiteral->?g1Serial]
                    ?g2[geo:wktLiteral->?g2Serial]
                    External(geof:sfEquals (?g1Serial,?g2Serial))
                )
                # feature – geometry rule
                And (
                    ?f1[geo:hasDefaultGeometry->?g1]
                    ?g1[geo:wktLiteral->?g1Serial]
                    ?f2[geo:wktLiteral->?g2Serial]
                    External(geof:sfEquals (?g1Serial,?g2Serial))
                )
                # geometry - feature rule
                And (
                    ?f2[geo:hasDefaultGeometry->?g2]
                    ?f1[geo:wktLiteral->?g1Serial]
                    ?g2[geo:wktLiteral->?g2Serial]
                    External(geof:sfEquals (?g1Serial,?g2Serial))
                )
                # geometry - geometry rule
                And (
                    ?f1[geo:wktLiteral->?g1Serial]
                    ?f2[geo:wktLiteral->?g2Serial]
                    External(geof:sfEquals (?g1Serial,?g2Serial))
                )
            )
        )

        # repetition of the ForAll elements for all GeoSPARQL relations

    )
)
----------

Any further comments on our use of RIF would be greatly appreciated too!

Regards,

Nicholas
-- 
Dr Nicholas J. Car
Data Systems Architect
SURROUND Australia Pty Ltd

GeoSPARQL QG member

References
---------------
[1] GeoSPARQL 1.0. http://www.opengis.net/doc/IS/geosparql/1.0. See Clause
11, p 30.
[2] None of the other validators listed at
https://www.w3.org/2005/rules/wiki/Implementations seem to be online other
than perhaps RIF4J
[3] http://rif4j.sourceforge.net/
[4] https://www.w3.org/2005/rules/wiki/RIF_In_RDF#Namespaces
[5] https://www.iana.org/assignments/media-types/media-types.xhtml
[6]
https://www.w3.org/2005/rules/test/repository/tc/Class_Membership/Class_Membership-premise.rifps

Received on Monday, 4 January 2021 02:51:49 UTC