File tree Expand file tree Collapse file tree 2 files changed +30
-4
lines changed Expand file tree Collapse file tree 2 files changed +30
-4
lines changed Original file line number Diff line number Diff line change
1
+ @prefix foaf: <http://xmlns.com/foaf/0.1/> .
2
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
3
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
4
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5
+
6
+ foaf:knows rdf:type owl:ObjectProperty ;
7
+ rdfs:domain foaf:Person ;
8
+ rdfs:range foaf:Person ;
9
+ rdfs:comment " A person known by this person (indicating some level of reciprocated interaction between the parties)." ;
10
+ rdfs:isDefinedBy <http://xmlns.com/foaf/0.1/> ;
11
+ rdfs:label " knows" .
12
+
13
+ foaf:Person rdf:type owl:Class ;
14
+ rdfs:subClassOf <http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing> ,
15
+ foaf:Agent ;
16
+ owl:disjointWith foaf:Project ;
17
+ rdfs:comment " A person." ;
18
+ rdfs:isDefinedBy <http://xmlns.com/foaf/0.1/> ;
19
+ rdfs:label " Person" .
Original file line number Diff line number Diff line change 16
16
17
17
REPRO = os .path .join (INPUT_DIR , 'reproschema.ttl' )
18
18
OUTSCHEMA = os .path .join (OUTPUT_DIR , 'reproschema-from-ttl.yaml' )
19
+ FOAF = os .path .join (INPUT_DIR , 'foaf_snippet.ttl' )
19
20
20
21
22
+ def test_import_foaf ():
23
+ engine = RdfsImportEngine ()
24
+ schema = engine .convert (FOAF )
25
+ sv = SchemaView (schema )
26
+ assert len (sv .all_classes ()) == 3
27
+ assert len (sv .all_slots ()) == 1
28
+ assert sv .get_slot ("knows" ).range == "Person"
29
+ assert sv .schema .default_prefix == "example"
30
+ assert "example" in sv .schema .prefixes
31
+
21
32
22
33
def test_from_rdfs ():
23
34
"""Test OWL conversion."""
@@ -36,7 +47,3 @@ def test_from_rdfs():
36
47
assert len (slots ) == 1
37
48
slot = slots [0 ]
38
49
assert slot .name == "id"
39
-
40
-
41
-
42
-
You can’t perform that action at this time.
0 commit comments