You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2012/08/17 18:12:18 UTC

svn commit: r1374339 - in /jena/Experimental/riot-reader/testing/FileManager: ./ README_LICENSE fmgr-test-file fmgr-test.zip foo.n3 location-mapping-test-file location-mapping-test.n3 location-mapping.n3

Author: andy
Date: Fri Aug 17 16:12:18 2012
New Revision: 1374339

URL: http://svn.apache.org/viewvc?rev=1374339&view=rev
Log: (empty)

Added:
    jena/Experimental/riot-reader/testing/FileManager/
    jena/Experimental/riot-reader/testing/FileManager/README_LICENSE
    jena/Experimental/riot-reader/testing/FileManager/fmgr-test-file
    jena/Experimental/riot-reader/testing/FileManager/fmgr-test.zip   (with props)
    jena/Experimental/riot-reader/testing/FileManager/foo.n3
    jena/Experimental/riot-reader/testing/FileManager/location-mapping-test-file
    jena/Experimental/riot-reader/testing/FileManager/location-mapping-test.n3
    jena/Experimental/riot-reader/testing/FileManager/location-mapping.n3

Added: jena/Experimental/riot-reader/testing/FileManager/README_LICENSE
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/testing/FileManager/README_LICENSE?rev=1374339&view=auto
==============================================================================
--- jena/Experimental/riot-reader/testing/FileManager/README_LICENSE (added)
+++ jena/Experimental/riot-reader/testing/FileManager/README_LICENSE Fri Aug 17 16:12:18 2012
@@ -0,0 +1,16 @@
+The following statement applied to all files in this directory unless otherwise noted:
+
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: jena/Experimental/riot-reader/testing/FileManager/fmgr-test-file
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/testing/FileManager/fmgr-test-file?rev=1374339&view=auto
==============================================================================
    (empty)

Added: jena/Experimental/riot-reader/testing/FileManager/fmgr-test.zip
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/testing/FileManager/fmgr-test.zip?rev=1374339&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jena/Experimental/riot-reader/testing/FileManager/fmgr-test.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: jena/Experimental/riot-reader/testing/FileManager/foo.n3
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/testing/FileManager/foo.n3?rev=1374339&view=auto
==============================================================================
--- jena/Experimental/riot-reader/testing/FileManager/foo.n3 (added)
+++ jena/Experimental/riot-reader/testing/FileManager/foo.n3 Fri Aug 17 16:12:18 2012
@@ -0,0 +1 @@
+<x> <y> <z> .
\ No newline at end of file

Added: jena/Experimental/riot-reader/testing/FileManager/location-mapping-test-file
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/testing/FileManager/location-mapping-test-file?rev=1374339&view=auto
==============================================================================
    (empty)

Added: jena/Experimental/riot-reader/testing/FileManager/location-mapping-test.n3
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/testing/FileManager/location-mapping-test.n3?rev=1374339&view=auto
==============================================================================
--- jena/Experimental/riot-reader/testing/FileManager/location-mapping-test.n3 (added)
+++ jena/Experimental/riot-reader/testing/FileManager/location-mapping-test.n3 Fri Aug 17 16:12:18 2012
@@ -0,0 +1,12 @@
+@prefix rdf:        <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs:	    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd:        <http://www.w3.org/2001/XMLSchema#> .
+@prefix lm:         <http://jena.hpl.hp.com/2004/08/location-mapping#> .
+
+[] lm:mapping
+   [ lm:name "file:test" ; lm:altName "file:testing/FileManager/location-mapping-test-file" ] ,
+   [ lm:name "http://example.org/file" ;
+     lm:altName "file:testing/FileManager/location-mapping-test-file" ] ,
+   [ lm:prefix "file:etc/" ; lm:altPrefix "file:ETC/" ] ,
+   [ lm:name "file:etc/foo.n3" ; lm:altName "file:DIR/foo.n3" ]
+   .

Added: jena/Experimental/riot-reader/testing/FileManager/location-mapping.n3
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/testing/FileManager/location-mapping.n3?rev=1374339&view=auto
==============================================================================
--- jena/Experimental/riot-reader/testing/FileManager/location-mapping.n3 (added)
+++ jena/Experimental/riot-reader/testing/FileManager/location-mapping.n3 Fri Aug 17 16:12:18 2012
@@ -0,0 +1,40 @@
+@prefix rdf:        <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs:	    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd:        <http://www.w3.org/2001/XMLSchema#> .
+@prefix lm:         <http://jena.hpl.hp.com/2004/08/location-mapping#> .
+
+# Application location to alternative location mappings.
+#
+# + Order does not matter.
+# + The location mapping parser looks for lm:mapping properties
+#   and uses the object value so this can be written in several different styles.
+# 
+# The translation algorithm is:
+#
+# 1 - Exact mappings: these are tried before attempting a prefix match.
+# 2 - By prefix: find the longest matching prefix
+# 3 - Use the original if no alternative.
+
+# Use N3's , (multiple objects => multiple statements of same subject and predicate)
+
+[] lm:mapping
+   [ lm:name "file:foo.n3" ; lm:altName "file:etc/foo.n3" ] ,
+   [ lm:prefix "file:etc/" ; lm:altPrefix "file:ETC/" ] ,
+   [ lm:name "file:etc/foo.n3" ; lm:altName "file:DIR/foo.n3" ]
+   .
+
+
+## # This is exactly the same graph using the ; syntax of N3
+## # Multiple statements with the same subject - and we used the same predicate.
+## 
+## []	lm:mapping [ lm:name "file:foo.n3" ; lm:altName "file:etc/foo.n3" ] .
+## 		lm:mapping [ lm:prefix "file:etc/" ; lm:altPrefix "file:ETC/" ] ;
+## 		lm:mapping [ lm:name "file:etc/foo.n3" ; lm:altName "file:DIR/foo.n3" ] ;
+## 	.
+
+## # Different graph - same effect.  The fatc there are different subjects is immaterial.
+## 
+## []	lm:mapping [ lm:name "file:foo.n3" ; lm:altName "file:etc/foo.n3" ] .
+## []	lm:mapping [ lm:prefix "file:etc/" ; lm:altPrefix "file:ETC/" ] .
+## []	lm:mapping [ lm:name "file:etc/foo.n3" ; lm:altName "file:DIR/foo.n3" ] .
+## 	.