semweb and http compile now (but they don't work properly yet).
This commit is contained in:
1030
packages/semweb/ChangeLog
Normal file
1030
packages/semweb/ChangeLog
Normal file
File diff suppressed because it is too large
Load Diff
203
packages/semweb/Makefile.in
Normal file
203
packages/semweb/Makefile.in
Normal file
@@ -0,0 +1,203 @@
|
||||
################################################################
|
||||
# Makefile template for SWI-Prolog RDF-DB package
|
||||
#
|
||||
# This template is used by configure to create Makefile. See
|
||||
# the file INSTALL for further installation instructions.
|
||||
#
|
||||
# License: LGPL
|
||||
#
|
||||
# Special targets:
|
||||
#
|
||||
# ln-install Install with symbolic links
|
||||
#
|
||||
# Author: Jan Wielemaker (wielemak@science.uva.nl)
|
||||
################################################################
|
||||
|
||||
.SUFFIXES: .tex .dvi .doc .pl
|
||||
|
||||
ifeq (@PROLOG_SYSTEM@,yap)
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
ROOTDIR = $(prefix)
|
||||
EROOTDIR = @exec_prefix@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
|
||||
srcdir=@srcdir@
|
||||
|
||||
BINDIR = $(EROOTDIR)/bin
|
||||
LIBDIR=@libdir@
|
||||
YAPLIBDIR=@libdir@/Yap
|
||||
SHAREDIR=$(ROOTDIR)/share/Yap
|
||||
|
||||
SHELL=@SHELL@
|
||||
PL=@INSTALL_ENV@ $(DESTDIR)$(BINDIR)/yap $(DESTDIR)$(YAPLIBDIR)/startup.yss
|
||||
EXDIR=$(YAPLIBDIR)/examples/http
|
||||
LN_S=@LN_S@
|
||||
#
|
||||
#
|
||||
CC=@CC@
|
||||
CFLAGS= @SHLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) -D_YAP_NOT_INSTALLED_=1 -I$(srcdir) -I../.. -I$(srcdir)/../../include @CPPFLAGS@
|
||||
MKINDEX=true
|
||||
|
||||
|
||||
SO=@SO@
|
||||
#4.1VPATH=@srcdir@:@srcdir@/OPTYap
|
||||
CWD=$(PWD)
|
||||
#
|
||||
|
||||
LD=@DO_SECOND_LD@ @SHLIB_CXX_LD@
|
||||
LDFLAGS=@EXTRA_LIBS_FOR_SWIDLLS@
|
||||
|
||||
BINTARGET=$(DESTDIR)$(YAPLIBDIR)
|
||||
PLTARGET=$(DESTDIR)$(SHAREDIR)/http
|
||||
|
||||
FINAL_BINTARGET=$(YAPLIBDIR)
|
||||
FINAL_PLTARGET=$(SHAREDIR)
|
||||
|
||||
%.o: $(srcdir)/%.c
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
else
|
||||
|
||||
PL=@PL@
|
||||
PLBASE=@PLBASE@
|
||||
PLARCH=@PLARCH@
|
||||
PLINCL=@PLINCL@
|
||||
PKGDOC=$(PLBASE)/doc/packages
|
||||
PCEHOME=../xpce
|
||||
LIBDIR=$(PLBASE)/library/semweb
|
||||
|
||||
CC=@CC@
|
||||
COFLAGS=@COFLAGS@
|
||||
CWFLAGS=@CWFLAGS@
|
||||
CMFLAGS=@CMFLAGS@
|
||||
CIFLAGS=-I.
|
||||
CFLAGS=$(COFLAGS) $(CWFLAGS) $(CMFLAGS) $(CIFLAGS) @DEFS@
|
||||
LIBS=@LIBS@
|
||||
NETLIBS=@NETLIBS@
|
||||
|
||||
PUBLICPL=swipl
|
||||
DOCTOTEX=$(PCEHOME)/bin/doc2tex
|
||||
PLTOTEX=$(PUBLICPL) -q -s pltotex.pl -g pltotex --
|
||||
DOC=semweb
|
||||
TEX=$(DOC).tex rdfturtle.tex rdfturtlewrite.tex rdfcompare.tex \
|
||||
rdfportray.tex rdflib.tex sparqlclient.tex
|
||||
DVI=$(DOC).dvi
|
||||
PDF=$(DOC).pdf
|
||||
RUNTEX=../../man/runtex
|
||||
|
||||
LD=@LD@
|
||||
LDFLAGS=@LDSOFLAGS@
|
||||
|
||||
endif
|
||||
|
||||
INSTALL=@INSTALL@
|
||||
INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
||||
INSTALL_DATA=@INSTALL_DATA@
|
||||
|
||||
include $(srcdir)/common.mk
|
||||
|
||||
TARGETS= rdf_db.@SO@ turtle.@SO@
|
||||
|
||||
RDFDBOBJ= rdf_db.o atom.o lock.o md5.o avl.o atom_map.o debug.o \
|
||||
hash.o murmur.o
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
rdf_db.@SO@: $(RDFDBOBJ)
|
||||
$(LD) $(LDFLAGS) -o $@ $(RDFDBOBJ) $(LIBS)
|
||||
turtle.@SO@: turtle.o
|
||||
$(LD) $(LDFLAGS) -o $@ turtle.o $(LIBS)
|
||||
|
||||
turtle.o: $(srcdir)/turtle.c $(srcdir)/turtle_chars.c
|
||||
|
||||
install: $(TARGETS) $(LIBPL)
|
||||
mkdir -p $(BINTARGET)
|
||||
for f in $(TARGETS); do \
|
||||
$(INSTALL) -m 755 $$f $(BINTARGET); \
|
||||
done
|
||||
for f in $(DATA) $(LIBPL) $(srcdir)/README; do \
|
||||
$(INSTALL_DATA) $$f $(PLTARGET); \
|
||||
done
|
||||
$(PL) -f none -g make -t halt
|
||||
|
||||
ln-install::
|
||||
$(MAKE) INSTALL=../ln-install \
|
||||
INSTALL_DATA=../ln-install \
|
||||
install
|
||||
|
||||
rpm-install: install
|
||||
|
||||
html-install::
|
||||
mkdir -p $(DESTDIR)$(PKGDOC)
|
||||
$(INSTALL) -m 644 $(DOC).html $(DESTDIR)$(PKGDOC)
|
||||
$(INSTALL) -m 644 $(srcdir)/modules.gif $(DESTDIR)$(PKGDOC)
|
||||
|
||||
pdf-install::
|
||||
mkdir -p $(DESTDIR)$(PKGDOC)
|
||||
$(INSTALL) -m 644 $(DOC).pdf $(DESTDIR)$(PKGDOC)
|
||||
|
||||
uninstall::
|
||||
(cd $(PLBASE)/lib/$(PLARCH) && rm -f $(TARGETS))
|
||||
(cd $(PLBASE)/library && rm -f $(LIBPL))
|
||||
$(PL) -f none -g make -t halt
|
||||
|
||||
rdf_db.o: $(srcdir)/quote.c $(srcdir)/unicode_map.c
|
||||
|
||||
################################################################
|
||||
# Documentation
|
||||
################################################################
|
||||
|
||||
pdf: $(PDF)
|
||||
|
||||
$(DVI): $(TEX)
|
||||
$(RUNTEX) $(DOC)
|
||||
|
||||
$(PDF): $(TEX)
|
||||
$(RUNTEX) --pdf $(DOC)
|
||||
|
||||
html: $(TEX)
|
||||
latex2html $(DOC)
|
||||
|
||||
$(TEX): $(DOCTOTEX)
|
||||
|
||||
rdfturtle.tex: $(srcdir)/rdf_turtle.pl
|
||||
$(PLTOTEX) --section 'library(semweb/rdf_turtle)'
|
||||
rdfturtlewrite.tex: $(srcdir)/rdf_turtle_write.pl
|
||||
$(PLTOTEX) --section 'library(semweb/rdf_turtle_write)'
|
||||
rdfcompare.tex: $(srcdir)/rdf_compare.pl
|
||||
$(PLTOTEX) --section 'library(semweb/rdf_compare)'
|
||||
rdfportray.tex: $(srcdir)/rdf_portray.pl
|
||||
$(PLTOTEX) --section 'library(semweb/rdf_portray)'
|
||||
sparqlclient.tex: $(srcdir)/sparql_client.pl
|
||||
$(PLTOTEX) --section 'library(semweb/sparql_client)'
|
||||
|
||||
.doc.tex:
|
||||
$(DOCTOTEX) $*.doc > $*.tex
|
||||
|
||||
################################################################
|
||||
# Check
|
||||
################################################################
|
||||
|
||||
check::
|
||||
$(PL) -q -f $(srcdir)/test_rdf_db.pl -g test_rdf_db,halt -t 'halt(1)'
|
||||
$(PL) -q -f $(srcdir)/litmap_test.pl -g test,halt -t 'halt(1)'
|
||||
$(PL) -q -f $(srcdir)/test.pl -g run_tests,halt -t 'halt(1)'
|
||||
$(PL) -q -f $(srcdir)/test_turtle.pl -g test_turtle,halt -t 'halt(1)'
|
||||
|
||||
|
||||
################################################################
|
||||
# Clean
|
||||
################################################################
|
||||
|
||||
clean: texclean
|
||||
rm -f $(OBJ) *~ *.o *% a.out core config.log
|
||||
|
||||
texclean:
|
||||
rm -f $(TEX) $(DOC).aux $(DOC).log $(DOC).out $(DOC).toc \
|
||||
$(DOC).ilg
|
||||
|
||||
distclean: clean
|
||||
rm -f $(TARGETS) config.cache config.h config.status Makefile
|
||||
|
67
packages/semweb/Makefile.mak
Normal file
67
packages/semweb/Makefile.mak
Normal file
@@ -0,0 +1,67 @@
|
||||
################################################################
|
||||
# Build the SWI-Prolog semantic web package for MS-Windows
|
||||
#
|
||||
# Author: Jan Wielemaker
|
||||
#
|
||||
# Use:
|
||||
# nmake /f Makefile.mak
|
||||
# nmake /f Makefile.mak install
|
||||
################################################################
|
||||
|
||||
PLHOME=..\..
|
||||
!include ..\..\src\rules.mk
|
||||
!include common.mk
|
||||
|
||||
LIBDIR= $(PLBASE)\library\semweb
|
||||
PKGDLL=rdf_db
|
||||
|
||||
OBJ= rdf_db.obj md5.obj avl.obj atom_map.obj atom.obj \
|
||||
lock.obj debug.obj hash.obj murmur.obj
|
||||
|
||||
all: $(PKGDLL).dll turtle.dll
|
||||
|
||||
$(PKGDLL).dll: $(OBJ)
|
||||
$(LD) /dll /out:$@ $(LDFLAGS) $(OBJ) $(PLLIB) $(LIBS)
|
||||
turtle.dll: turtle.obj
|
||||
$(LD) /dll /out:$@ $(LDFLAGS) turtle.obj $(PLLIB) $(LIBS)
|
||||
|
||||
turtle.obj: turtle.c turtle_chars.c
|
||||
|
||||
!IF "$(CFG)" == "rt"
|
||||
install: idll
|
||||
!ELSE
|
||||
install: idll ilib
|
||||
!ENDIF
|
||||
|
||||
idll::
|
||||
copy $(PKGDLL).dll "$(BINDIR)"
|
||||
copy turtle.dll "$(BINDIR)"
|
||||
ilib::
|
||||
if not exist "$(LIBDIR)/$(NULL)" $(MKDIR) "$(LIBDIR)"
|
||||
@echo Copying $(LIBPL)
|
||||
@for %f in ($(LIBPL)) do @copy %f "$(LIBDIR)"
|
||||
@for %f in ($(DATA)) do @copy %f "$(LIBDIR)"
|
||||
copy README "$(LIBDIR)\README.TXT"
|
||||
$(MAKEINDEX)
|
||||
|
||||
html-install::
|
||||
copy semweb.html "$(PKGDOC)"
|
||||
copy modules.gif "$(PKGDOC)"
|
||||
pdf-install:
|
||||
copy semweb.pdf "$(PKGDOC)"
|
||||
|
||||
xpce-install::
|
||||
|
||||
uninstall::
|
||||
del "$(PLBASE)\bin\$(PKGDLL).dll"
|
||||
cd $(LIBDIR) & del $(LIBPL) $(DATA) README.TXT
|
||||
rmdir $(LIBDIR)
|
||||
$(MAKEINDEX)
|
||||
|
||||
clean::
|
||||
if exist *.obj del *.obj
|
||||
if exist *~ del *~
|
||||
|
||||
distclean: clean
|
||||
-DEL *.dll *.lib *.exp *.pdb *.ilk 2>nul
|
||||
|
13
packages/semweb/NOTES
Normal file
13
packages/semweb/NOTES
Normal file
@@ -0,0 +1,13 @@
|
||||
Indexing
|
||||
========
|
||||
|
||||
The indexing omits the table BY_SPO, indexing on all three arguments but
|
||||
uses BY_SP instead. It was thought not to gain that much. This
|
||||
assumption was verified on real data (100,000 triple). Introducing
|
||||
BY_SPO gave a slowdown of about 10%. Appearently the relatively high cost
|
||||
for indexing on the complicated object field outweights the benefits.
|
||||
|
||||
The patch is left for reference in BY_SPO.diff. Note that after applying
|
||||
this patch the test cases no longer pass. As the failing cases were
|
||||
irrelevant to the performance test I never bothered fixing this due to
|
||||
the failed performance test.
|
33
packages/semweb/README
Normal file
33
packages/semweb/README
Normal file
@@ -0,0 +1,33 @@
|
||||
---+ SWI-Prolog Semantic Web Library
|
||||
|
||||
---++ Abstract
|
||||
|
||||
The semweb library provides a Prolog library based on foreign-language
|
||||
extensions for storing and manipulating RDF triples. It can handle quite
|
||||
large sets of triples only limited by available memory. One million
|
||||
triples requires about 80MB memory, so a fully equiped 32-bit machine
|
||||
can handle about 25 million triples. A 64-bit machine with 32Gb memory
|
||||
(just a few thousand euros in june 2009) can handle up to 150 million
|
||||
triples.
|
||||
|
||||
|
||||
---++ Prerequisites
|
||||
|
||||
This library depends on the RDF parser library which in turn depends on
|
||||
the XML parser provided by the sgml package.
|
||||
|
||||
|
||||
---++ Further info
|
||||
|
||||
This library defines the semantic web infrastructure for SWI-Prolog. The
|
||||
library is documented in semweb.pdf or the equivalent semweb.html. If
|
||||
your installation does not include this file, please visit
|
||||
http://www.swi-prolog.org/packages/
|
||||
|
||||
|
||||
---++ Staying up-to-date
|
||||
|
||||
This library is under active development. The recent version can be
|
||||
accessed from the GIT repository under the directory pl/packages/semweb.
|
||||
See http://www.swi-prolog.org/git.html for details on the central GIT
|
||||
repository and instructions for browsing the repository online.
|
32
packages/semweb/TODO
Normal file
32
packages/semweb/TODO
Normal file
@@ -0,0 +1,32 @@
|
||||
* Add indexing on source, to speedup saving a particular source as well as
|
||||
rdf_retractall(_,_,_,Src).
|
||||
|
||||
* Add indexing for rdf(+,+,+)? Might speedup loading (duplicate adiminstration).
|
||||
|
||||
* Document hookable rdf_load/2
|
||||
|
||||
* Allow for concurrent transactions.
|
||||
|
||||
- Starting a transaction obtains no lock
|
||||
- Each thread has its own transaction queue
|
||||
- If a thread that has a transaction starts one, this (still)
|
||||
creates a nested transaction.
|
||||
- Only if a transaction is about to be comitted, it obtains a
|
||||
write-lock, plays the queue and releases the write lock.
|
||||
|
||||
What goes wrong now?
|
||||
|
||||
- If a transaction does repeated read queries, it may see different
|
||||
data during its read actions.
|
||||
- This could be avoided using generation-stamps, similar to Prolog
|
||||
- How can queued actions interfere with each other?
|
||||
- A: S0 --> S1
|
||||
- B: S0 --> S2
|
||||
|
||||
Asynchronous write is generally possible, unless it requires a re-hash.
|
||||
|
||||
- Writes must remain sequentially (for the persistency and callback
|
||||
assumptions).
|
||||
- Can we avoid the *need* for a re-hash? This would require multiple
|
||||
queries if predicate clouds are joined.
|
||||
|
20
packages/semweb/Tests/Turtle/README.txt
Normal file
20
packages/semweb/Tests/Turtle/README.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
These are the tests for the Turtle Terse RDF Triple Language
|
||||
that must be passed by conformant systems. See
|
||||
http://www.dajobe.org/2004/01/turtle/
|
||||
for the full conformance information.
|
||||
|
||||
The format is a set of good tests and bad tests.
|
||||
|
||||
Good tests are a pair of files:
|
||||
abc.ttl abc.out
|
||||
which are the input Turtle file and the expected output RDF triples,
|
||||
written in N-Triples.
|
||||
|
||||
bad tests are of the form
|
||||
bad-XX.ttl
|
||||
which must fail.
|
||||
|
||||
The tests should be performed with an assumed base URI
|
||||
of http://www.w3.org/2001/sw/DataAccess/df1/tests/
|
||||
|
||||
Dave
|
2
packages/semweb/Tests/Turtle/bad-00.ttl
Normal file
2
packages/semweb/Tests/Turtle/bad-00.ttl
Normal file
@@ -0,0 +1,2 @@
|
||||
# prefix name must end in a :
|
||||
@prefix a <#> .
|
3
packages/semweb/Tests/Turtle/bad-01.ttl
Normal file
3
packages/semweb/Tests/Turtle/bad-01.ttl
Normal file
@@ -0,0 +1,3 @@
|
||||
# Forbidden by RDF - predicate cannot be blank
|
||||
@prefix : <http://example.org/base#> .
|
||||
:a [ :b :c ] :d .
|
3
packages/semweb/Tests/Turtle/bad-02.ttl
Normal file
3
packages/semweb/Tests/Turtle/bad-02.ttl
Normal file
@@ -0,0 +1,3 @@
|
||||
# Forbidden by RDF - predicate cannot be blank
|
||||
@prefix : <http://example.org/base#> .
|
||||
:a [] :b .
|
3
packages/semweb/Tests/Turtle/bad-03.ttl
Normal file
3
packages/semweb/Tests/Turtle/bad-03.ttl
Normal file
@@ -0,0 +1,3 @@
|
||||
# 'a' only allowed as a predicate
|
||||
@prefix : <http://example.org/base#> .
|
||||
a :a :b .
|
3
packages/semweb/Tests/Turtle/bad-04.ttl
Normal file
3
packages/semweb/Tests/Turtle/bad-04.ttl
Normal file
@@ -0,0 +1,3 @@
|
||||
# No comma is allowed in collections
|
||||
@prefix : <http://example.org/stuff/1.0/> .
|
||||
:a :b ( "apple", "banana" ) .
|
4
packages/semweb/Tests/Turtle/bad-05.ttl
Normal file
4
packages/semweb/Tests/Turtle/bad-05.ttl
Normal file
@@ -0,0 +1,4 @@
|
||||
# N3 {}s are not in Turtle
|
||||
@prefix : <http://example.org/stuff/1.0/> .
|
||||
{ :a :b :c . } :d :e .
|
||||
|
3
packages/semweb/Tests/Turtle/bad-06.ttl
Normal file
3
packages/semweb/Tests/Turtle/bad-06.ttl
Normal file
@@ -0,0 +1,3 @@
|
||||
# is and of are not in turtle
|
||||
@prefix : <http://example.org/stuff/1.0/> .
|
||||
:a is :b of :c .
|
4
packages/semweb/Tests/Turtle/bad-07.ttl
Normal file
4
packages/semweb/Tests/Turtle/bad-07.ttl
Normal file
@@ -0,0 +1,4 @@
|
||||
# paths are not in turtle
|
||||
@prefix : <http://example.org/stuff/1.0/> .
|
||||
:a.:b.:c .
|
||||
:a^:b^:c .
|
2
packages/semweb/Tests/Turtle/bad-08.ttl
Normal file
2
packages/semweb/Tests/Turtle/bad-08.ttl
Normal file
@@ -0,0 +1,2 @@
|
||||
@keywords something.
|
||||
# @keywords is not in turtle
|
3
packages/semweb/Tests/Turtle/bad-09.ttl
Normal file
3
packages/semweb/Tests/Turtle/bad-09.ttl
Normal file
@@ -0,0 +1,3 @@
|
||||
# implies is not in turtle
|
||||
@prefix : <http://example.org/stuff/1.0/> .
|
||||
:a => :b .
|
3
packages/semweb/Tests/Turtle/bad-10.ttl
Normal file
3
packages/semweb/Tests/Turtle/bad-10.ttl
Normal file
@@ -0,0 +1,3 @@
|
||||
# equivalence is not in turtle
|
||||
@prefix : <http://example.org/stuff/1.0/> .
|
||||
:a = :b .
|
3
packages/semweb/Tests/Turtle/bad-11.ttl
Normal file
3
packages/semweb/Tests/Turtle/bad-11.ttl
Normal file
@@ -0,0 +1,3 @@
|
||||
# @forAll is not in turtle
|
||||
@prefix : <http://example.org/stuff/1.0/> .
|
||||
@forAll :x .
|
3
packages/semweb/Tests/Turtle/bad-12.ttl
Normal file
3
packages/semweb/Tests/Turtle/bad-12.ttl
Normal file
@@ -0,0 +1,3 @@
|
||||
# @forSome is not in turtle
|
||||
@prefix : <http://example.org/stuff/1.0/> .
|
||||
@forSome :x .
|
3
packages/semweb/Tests/Turtle/bad-13.ttl
Normal file
3
packages/semweb/Tests/Turtle/bad-13.ttl
Normal file
@@ -0,0 +1,3 @@
|
||||
# <= is not in turtle
|
||||
@prefix : <http://example.org/stuff/1.0/> .
|
||||
:a <= :b .
|
6
packages/semweb/Tests/Turtle/bad-14.ttl
Normal file
6
packages/semweb/Tests/Turtle/bad-14.ttl
Normal file
@@ -0,0 +1,6 @@
|
||||
# Test long literals with missing end
|
||||
@prefix : <http://example.org/ex#> .
|
||||
:a :b """a long
|
||||
literal
|
||||
with
|
||||
newlines
|
88
packages/semweb/Tests/Turtle/manifest-bad.ttl
Normal file
88
packages/semweb/Tests/Turtle/manifest-bad.ttl
Normal file
@@ -0,0 +1,88 @@
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
|
||||
@prefix qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> .
|
||||
|
||||
<> rdf:type mf:Manifest ;
|
||||
rdfs:comment "Turtle bad syntax test cases (must fail)" ;
|
||||
mf:entries
|
||||
(
|
||||
|
||||
[ mf:name "bad-00" ;
|
||||
rdfs:comment "prefix name must end in a :" ;
|
||||
mf:action [ qt:data <bad-00.ttl> ] ;
|
||||
]
|
||||
|
||||
[ mf:name "bad-01" ;
|
||||
rdfs:comment "blank predicate forbidden" ;
|
||||
mf:action [ qt:data <bad-01.ttl> ] ;
|
||||
]
|
||||
|
||||
[ mf:name "bad-02" ;
|
||||
rdfs:comment "blank predicate forbidden" ;
|
||||
mf:action [ qt:data <bad-02.ttl> ] ;
|
||||
]
|
||||
|
||||
[ mf:name "bad-03" ;
|
||||
rdfs:comment "a forbidden as subject" ;
|
||||
mf:action [ qt:data <bad-03.ttl> ] ;
|
||||
]
|
||||
|
||||
[ mf:name "bad-04" ;
|
||||
rdfs:comment ", not allowed in collections" ;
|
||||
mf:action [ qt:data <bad-04.ttl> ] ;
|
||||
]
|
||||
|
||||
[ mf:name "bad-05" ;
|
||||
rdfs:comment "{} not allowed in Turtle" ;
|
||||
mf:action [ qt:data <bad-05.ttl> ] ;
|
||||
]
|
||||
|
||||
[ mf:name "bad-06" ;
|
||||
rdfs:comment "is and of not allowed in Turtle" ;
|
||||
mf:action [ qt:data <bad-06.ttl> ] ;
|
||||
]
|
||||
|
||||
[ mf:name "bad-07" ;
|
||||
rdfs:comment "paths not allowed in Turtle" ;
|
||||
mf:action [ qt:data <bad-07.ttl> ] ;
|
||||
]
|
||||
|
||||
[ mf:name "bad-08" ;
|
||||
rdfs:comment "@keywords not allowed in Turtle" ;
|
||||
mf:action [ qt:data <bad-08.ttl> ] ;
|
||||
]
|
||||
|
||||
[ mf:name "bad-09" ;
|
||||
rdfs:comment "=> not allowed in Turtle" ;
|
||||
mf:action [ qt:data <bad-09.ttl> ] ;
|
||||
]
|
||||
|
||||
[ mf:name "bad-10" ;
|
||||
rdfs:comment "= not allowed in Turtle" ;
|
||||
mf:action [ qt:data <bad-10.ttl> ] ;
|
||||
]
|
||||
|
||||
[ mf:name "bad-11" ;
|
||||
rdfs:comment "@forAll not allowed in Turtle" ;
|
||||
mf:action [ qt:data <bad-11.ttl> ] ;
|
||||
]
|
||||
|
||||
[ mf:name "bad-12" ;
|
||||
rdfs:comment "@forSome not allowed in Turtle" ;
|
||||
mf:action [ qt:data <bad-12.ttl> ] ;
|
||||
]
|
||||
|
||||
[ mf:name "bad-13" ;
|
||||
rdfs:comment "<= not allowed in Turtle" ;
|
||||
mf:action [ qt:data <bad-13.ttl> ] ;
|
||||
]
|
||||
|
||||
[ mf:name "bad-14" ;
|
||||
rdfs:comment "long literal with missing end" ;
|
||||
mf:action [ qt:data <bad-14.ttl> ] ;
|
||||
]
|
||||
|
||||
|
||||
# End of tests
|
||||
).
|
215
packages/semweb/Tests/Turtle/manifest.ttl
Normal file
215
packages/semweb/Tests/Turtle/manifest.ttl
Normal file
@@ -0,0 +1,215 @@
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
|
||||
@prefix qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> .
|
||||
|
||||
<> rdf:type mf:Manifest ;
|
||||
rdfs:comment "Turtle good syntax test cases (must pass)" ;
|
||||
mf:entries
|
||||
(
|
||||
[ mf:name "test-00" ;
|
||||
rdfs:comment "Blank subject" ;
|
||||
mf:action [ qt:data <test-00.ttl> ] ;
|
||||
mf:result <test-00.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-01" ;
|
||||
rdfs:comment "@prefix and qnames" ;
|
||||
mf:action [ qt:data <test-01.ttl> ] ;
|
||||
mf:result <test-01.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-02" ;
|
||||
rdfs:comment ", operator" ;
|
||||
mf:action [ qt:data <test-02.ttl> ] ;
|
||||
mf:result <test-02.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-03" ;
|
||||
rdfs:comment "; operator" ;
|
||||
mf:action [ qt:data <test-03.ttl> ] ;
|
||||
mf:result <test-03.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-04" ;
|
||||
rdfs:comment "empty [] as subject and object" ;
|
||||
mf:action [ qt:data <test-04.ttl> ] ;
|
||||
mf:result <test-04.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-05" ;
|
||||
rdfs:comment "non-empty [] as subject and object" ;
|
||||
mf:action [ qt:data <test-05.ttl> ] ;
|
||||
mf:result <test-05.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-06" ;
|
||||
rdfs:comment "'a' as predicate" ;
|
||||
mf:action [ qt:data <test-06.ttl> ] ;
|
||||
mf:result <test-06.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-07" ;
|
||||
rdfs:comment "simple collection" ;
|
||||
mf:action [ qt:data <test-07.ttl> ] ;
|
||||
mf:result <test-07.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-08" ;
|
||||
rdfs:comment "empty collection" ;
|
||||
mf:action [ qt:data <test-08.ttl> ] ;
|
||||
mf:result <test-08.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-09" ;
|
||||
rdfs:comment "integer datatyped literal" ;
|
||||
mf:action [ qt:data <test-09.ttl> ] ;
|
||||
mf:result <test-09.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-10" ;
|
||||
rdfs:comment "decimal integer canonicalization" ;
|
||||
mf:action [ qt:data <test-10.ttl> ] ;
|
||||
mf:result <test-10.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-11" ;
|
||||
rdfs:comment "- and _ in names and qnames" ;
|
||||
mf:action [ qt:data <test-11.ttl> ] ;
|
||||
mf:result <test-11.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-12" ;
|
||||
rdfs:comment "tests for rdf:_<numbers> and other qnames starting with _" ;
|
||||
mf:action [ qt:data <test-12.ttl> ] ;
|
||||
mf:result <test-12.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-13" ;
|
||||
rdfs:comment "bare : allowed" ;
|
||||
mf:action [ qt:data <test-13.ttl> ] ;
|
||||
mf:result <test-13.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-14" ;
|
||||
rdfs:comment "10000 triples, more than the default Bison stack size" ;
|
||||
mf:action [ qt:data <test-14.ttl> ] ;
|
||||
mf:result <test-14.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-15" ;
|
||||
rdfs:comment "10000 triple objects (10000 triples)" ;
|
||||
mf:action [ qt:data <test-15.ttl> ] ;
|
||||
mf:result <test-15.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-16" ;
|
||||
rdfs:comment "10000 items (10000 triples)" ;
|
||||
mf:action [ qt:data <test-16.ttl> ] ;
|
||||
mf:result <test-16.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-17" ;
|
||||
rdfs:comment "simple long literal" ;
|
||||
mf:action [ qt:data <test-17.ttl> ] ;
|
||||
mf:result <test-17.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-18" ;
|
||||
rdfs:comment "long literals with escapes" ;
|
||||
mf:action [ qt:data <test-18.ttl> ] ;
|
||||
mf:result <test-18.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-19" ;
|
||||
rdfs:comment "floating point number" ;
|
||||
mf:action [ qt:data <test-19.ttl> ] ;
|
||||
mf:result <test-19.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-20" ;
|
||||
rdfs:comment "empty literals, normal and long variant" ;
|
||||
mf:action [ qt:data <test-20.ttl> ] ;
|
||||
mf:result <test-20.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-21" ;
|
||||
rdfs:comment "positive integer, decimal and doubles" ;
|
||||
mf:action [ qt:data <test-21.ttl> ] ;
|
||||
mf:result <test-21.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-22" ;
|
||||
rdfs:comment "negative integer, decimal and doubles" ;
|
||||
mf:action [ qt:data <test-22.ttl> ] ;
|
||||
mf:result <test-22.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-23" ;
|
||||
rdfs:comment "long literal ending in double quote" ;
|
||||
mf:action [ qt:data <test-23.ttl> ] ;
|
||||
mf:result <test-23.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-24" ;
|
||||
rdfs:comment "boolean literals" ;
|
||||
mf:action [ qt:data <test-24.ttl> ] ;
|
||||
mf:result <test-24.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-25" ;
|
||||
rdfs:comment "comments" ;
|
||||
mf:action [ qt:data <test-25.ttl> ] ;
|
||||
mf:result <test-25.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-26" ;
|
||||
rdfs:comment "no final mewline" ;
|
||||
mf:action [ qt:data <test-26.ttl> ] ;
|
||||
mf:result <test-26.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-27" ;
|
||||
rdfs:comment "duplicate prefix" ;
|
||||
mf:action [ qt:data <test-27.ttl> ] ;
|
||||
mf:result <test-27.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-28" ;
|
||||
rdfs:comment "decimal data types (serializing test)" ;
|
||||
mf:action [ qt:data <test-28.ttl> ] ;
|
||||
mf:result <test-28.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-29" ;
|
||||
rdfs:comment "Escaping U+0001 to U+007F in a URI" ;
|
||||
mf:action [ qt:data <test-29.ttl> ] ;
|
||||
mf:result <test-29.out>
|
||||
]
|
||||
|
||||
[ mf:name "test-30" ;
|
||||
rdfs:comment "@base" ;
|
||||
mf:action [ qt:data <test-30.ttl> ] ;
|
||||
mf:result <test-30.out>
|
||||
]
|
||||
|
||||
[ mf:name "rdf-schema" ;
|
||||
rdfs:comment "RDF Namespace document converted into Turtle" ;
|
||||
mf:action [ qt:data <rdf-schema.ttl> ] ;
|
||||
mf:result <rdf-schema.out>
|
||||
]
|
||||
|
||||
[ mf:name "rdfs-namespace" ;
|
||||
rdfs:comment "RDFS Namespace document converted into Turtle" ;
|
||||
mf:action [ qt:data <rdfs-namespace.ttl> ] ;
|
||||
mf:result <rdfs-namespace.out>
|
||||
]
|
||||
|
||||
[ mf:name "rdfq-results" ;
|
||||
rdfs:comment "Example query result from http://www.w3.org/2003/03/rdfqr-tests/recording-query-results.html" ;
|
||||
mf:action [ qt:data <rdfq-results.ttl> ] ;
|
||||
mf:result <rdfq-results.out>
|
||||
]
|
||||
|
||||
# End of tests
|
||||
).
|
126
packages/semweb/Tests/Turtle/rdf-schema.out
Normal file
126
packages/semweb/Tests/Turtle/rdf-schema.out
Normal file
@@ -0,0 +1,126 @@
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#comment> "Indicates membership of a class" .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#label> "type"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#label> "type"@fr .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Class> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Class> <http://www.w3.org/2000/01/rdf-schema#comment> "The concept of Class" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Class> <http://www.w3.org/2000/01/rdf-schema#label> "Class"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Class> <http://www.w3.org/2000/01/rdf-schema#label> "Classe"@fr .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Class> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ConstraintProperty> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ConstraintProperty> <http://www.w3.org/2000/01/rdf-schema#comment> "Properties used to express RDF Schema constraints." .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ConstraintProperty> <http://www.w3.org/2000/01/rdf-schema#label> "ConstraintProperty"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ConstraintProperty> <http://www.w3.org/2000/01/rdf-schema#label> "Propri\u00E9t\u00E9Contrainte"@fr .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ConstraintProperty> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#ConstraintResource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ConstraintProperty> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ConstraintResource> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ConstraintResource> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ConstraintResource> <http://www.w3.org/2000/01/rdf-schema#comment> "Resources used to express RDF Schema constraints." .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ConstraintResource> <http://www.w3.org/2000/01/rdf-schema#label> "ConstraintResource"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ConstraintResource> <http://www.w3.org/2000/01/rdf-schema#label> "RessourceContrainte"@fr .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ConstraintResource> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Container> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Container> <http://www.w3.org/2000/01/rdf-schema#comment> "This represents the set Containers." .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Container> <http://www.w3.org/2000/01/rdf-schema#label> "Container"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Container> <http://www.w3.org/2000/01/rdf-schema#label> "Enveloppe"@fr .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Container> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ContainerMembershipProperty> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ContainerMembershipProperty> <http://www.w3.org/2000/01/rdf-schema#label> "ContainerMembershipProperty"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ContainerMembershipProperty> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Literal> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Literal> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Literal> <http://www.w3.org/2000/01/rdf-schema#comment> "This represents the set of atomic values, eg. textual strings." .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Literal> <http://www.w3.org/2000/01/rdf-schema#label> "Literal"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Literal> <http://www.w3.org/2000/01/rdf-schema#label> "Litt\u00E9ral"@fr .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Resource> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Resource> <http://www.w3.org/2000/01/rdf-schema#comment> "The most general class" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Resource> <http://www.w3.org/2000/01/rdf-schema#label> "Resource"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Resource> <http://www.w3.org/2000/01/rdf-schema#label> "Ressource"@fr .
|
||||
<http://www.w3.org/2000/01/rdf-schema#comment> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#comment> <http://www.w3.org/2000/01/rdf-schema#comment> "Use this for descriptions" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#comment> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#comment> <http://www.w3.org/2000/01/rdf-schema#label> "comment"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#comment> <http://www.w3.org/2000/01/rdf-schema#label> "commentaire"@fr .
|
||||
<http://www.w3.org/2000/01/rdf-schema#comment> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Literal> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#ConstraintProperty> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#comment> "This is how we associate a class with properties that its instances can have" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#label> "domain"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#label> "domaine"@fr .
|
||||
<http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#comment> "Indicates a resource containing and defining the subject resource." .
|
||||
<http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#label> "esD\u00E9finiPar"@fr .
|
||||
<http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#label> "isDefinedBy"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/2000/01/rdf-schema#seeAlso> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#label> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#label> <http://www.w3.org/2000/01/rdf-schema#comment> "Provides a human-readable version of a resource name." .
|
||||
<http://www.w3.org/2000/01/rdf-schema#label> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#label> <http://www.w3.org/2000/01/rdf-schema#label> "label"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#label> <http://www.w3.org/2000/01/rdf-schema#label> "label"@fr .
|
||||
<http://www.w3.org/2000/01/rdf-schema#label> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Literal> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#ConstraintProperty> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#comment> "Properties that can be used in a schema to provide constraints" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#label> "range"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#label> "\u00E9tendue"@fr .
|
||||
<http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/2000/01/rdf-schema#comment> "Indicates a resource that provides information about the subject resource." .
|
||||
<http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/2000/01/rdf-schema#label> "seeAlso"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/2000/01/rdf-schema#label> "voirAussi"@fr .
|
||||
<http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#comment> "Indicates membership of a class" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#label> "sousClasseDe"@fr .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#label> "subClassOf"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/2000/01/rdf-schema#comment> "Indicates specialization of properties" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/2000/01/rdf-schema#label> "sousPropri\u00E9t\u00E9De"@fr .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/2000/01/rdf-schema#label> "subPropertyOf"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> <http://www.w3.org/2000/01/rdf-schema#label> "Alt"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> <http://www.w3.org/2000/01/rdf-schema#label> "Choix"@fr .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Container> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> <http://www.w3.org/2000/01/rdf-schema#label> "Bag"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> <http://www.w3.org/2000/01/rdf-schema#label> "Ensemble"@fr .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Container> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://www.w3.org/2000/01/rdf-schema#comment> "The concept of a property." .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://www.w3.org/2000/01/rdf-schema#label> "Property"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://www.w3.org/2000/01/rdf-schema#label> "Propri\u00E9t\u00E9"@fr .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> <http://www.w3.org/2000/01/rdf-schema#label> "Sequence"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> <http://www.w3.org/2000/01/rdf-schema#label> "S\u00E9quence"@fr .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Container> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> <http://www.w3.org/2000/01/rdf-schema#comment> "This represents the set of reified statements." .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> <http://www.w3.org/2000/01/rdf-schema#label> "D\u00E9claration"@fr .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> <http://www.w3.org/2000/01/rdf-schema#label> "Statement"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://www.w3.org/2000/01/rdf-schema#label> "object"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://www.w3.org/2000/01/rdf-schema#label> "objet"@fr .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.w3.org/2000/01/rdf-schema#label> "predicate"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.w3.org/2000/01/rdf-schema#label> "pr\u00E9dicat"@fr .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://www.w3.org/2000/01/rdf-schema#label> "subject"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://www.w3.org/2000/01/rdf-schema#label> "sujet"@fr .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#value> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#value> <http://www.w3.org/2000/01/rdf-schema#label> "object"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#value> <http://www.w3.org/2000/01/rdf-schema#label> "value"@fr .
|
||||
<http://www.w3.org/2000/01/rdf-schema#> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/2000/01/rdf-schema-more> .
|
156
packages/semweb/Tests/Turtle/rdf-schema.ttl
Normal file
156
packages/semweb/Tests/Turtle/rdf-schema.ttl
Normal file
@@ -0,0 +1,156 @@
|
||||
# RDF Namespace document converted into Turtle
|
||||
|
||||
@prefix : <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
|
||||
rdf:type a rdf:Property;
|
||||
:comment "Indicates membership of a class";
|
||||
:label "type"@en,
|
||||
"type"@fr;
|
||||
:range :Class .
|
||||
|
||||
:Class a :Class;
|
||||
:comment "The concept of Class";
|
||||
:label "Class"@en,
|
||||
"Classe"@fr;
|
||||
:subClassOf :Resource .
|
||||
|
||||
:ConstraintProperty a :Class;
|
||||
:comment "Properties used to express RDF Schema constraints.";
|
||||
:label "ConstraintProperty"@en,
|
||||
"Propri\u00E9t\u00E9Contrainte"@fr;
|
||||
:subClassOf :ConstraintResource,
|
||||
rdf:Property .
|
||||
|
||||
:ConstraintResource a :Class,
|
||||
:Class;
|
||||
:comment "Resources used to express RDF Schema constraints.";
|
||||
:label "ConstraintResource"@en,
|
||||
"RessourceContrainte"@fr;
|
||||
:subClassOf :Resource .
|
||||
|
||||
:Container a :Class;
|
||||
:comment "This represents the set Containers.";
|
||||
:label "Container"@en,
|
||||
"Enveloppe"@fr;
|
||||
:subClassOf :Resource .
|
||||
|
||||
:ContainerMembershipProperty a :Class;
|
||||
:label "ContainerMembershipProperty"@en;
|
||||
:subClassOf rdf:Property .
|
||||
|
||||
:Literal a :Class,
|
||||
:Class;
|
||||
:comment "This represents the set of atomic values, eg. textual strings.";
|
||||
:label "Literal"@en,
|
||||
"Litt\u00E9ral"@fr .
|
||||
|
||||
:Resource a :Class;
|
||||
:comment "The most general class";
|
||||
:label "Resource"@en,
|
||||
"Ressource"@fr .
|
||||
|
||||
:comment a rdf:Property;
|
||||
:comment "Use this for descriptions";
|
||||
:domain :Resource;
|
||||
:label "comment"@en,
|
||||
"commentaire"@fr;
|
||||
:range :Literal .
|
||||
|
||||
:domain a :ConstraintProperty;
|
||||
:comment "This is how we associate a class with properties that its instances can have";
|
||||
:label "domain"@en,
|
||||
"domaine"@fr .
|
||||
|
||||
:isDefinedBy a rdf:Property;
|
||||
:comment "Indicates a resource containing and defining the subject resource.";
|
||||
:domain :Resource;
|
||||
:label "esD\u00E9finiPar"@fr,
|
||||
"isDefinedBy"@en;
|
||||
:range :Resource;
|
||||
:subPropertyOf :seeAlso .
|
||||
|
||||
:label a rdf:Property;
|
||||
:comment "Provides a human-readable version of a resource name.";
|
||||
:domain :Resource;
|
||||
:label "label"@en,
|
||||
"label"@fr;
|
||||
:range :Literal .
|
||||
|
||||
:range a :ConstraintProperty;
|
||||
:comment "Properties that can be used in a schema to provide constraints";
|
||||
:domain rdf:Property;
|
||||
:label "range"@en,
|
||||
"\u00E9tendue"@fr;
|
||||
:range :Class .
|
||||
|
||||
:seeAlso a rdf:Property;
|
||||
:comment "Indicates a resource that provides information about the subject resource.";
|
||||
:domain :Resource;
|
||||
:label "seeAlso"@en,
|
||||
"voirAussi"@fr;
|
||||
:range :Resource .
|
||||
|
||||
:subClassOf a rdf:Property;
|
||||
:comment "Indicates membership of a class";
|
||||
:domain :Class;
|
||||
:label "sousClasseDe"@fr,
|
||||
"subClassOf"@en;
|
||||
:range :Class .
|
||||
|
||||
:subPropertyOf a rdf:Property;
|
||||
:comment "Indicates specialization of properties";
|
||||
:domain rdf:Property;
|
||||
:label "sousPropri\u00E9t\u00E9De"@fr,
|
||||
"subPropertyOf"@en;
|
||||
:range rdf:Property .
|
||||
|
||||
rdf:Alt a :Class;
|
||||
:label "Alt"@en,
|
||||
"Choix"@fr;
|
||||
:subClassOf :Container .
|
||||
|
||||
rdf:Bag a :Class;
|
||||
:label "Bag"@en,
|
||||
"Ensemble"@fr;
|
||||
:subClassOf :Container .
|
||||
|
||||
rdf:Property a :Class;
|
||||
:comment "The concept of a property.";
|
||||
:label "Property"@en,
|
||||
"Propri\u00E9t\u00E9"@fr;
|
||||
:subClassOf :Resource .
|
||||
|
||||
rdf:Seq a :Class;
|
||||
:label "Sequence"@en,
|
||||
"S\u00E9quence"@fr;
|
||||
:subClassOf :Container .
|
||||
|
||||
rdf:Statement a :Class;
|
||||
:comment "This represents the set of reified statements.";
|
||||
:label "D\u00E9claration"@fr,
|
||||
"Statement"@en;
|
||||
:subClassOf :Resource .
|
||||
|
||||
rdf:object a rdf:Property;
|
||||
:domain rdf:Statement;
|
||||
:label "object"@en,
|
||||
"objet"@fr .
|
||||
|
||||
rdf:predicate a rdf:Property;
|
||||
:domain rdf:Statement;
|
||||
:label "predicate"@en,
|
||||
"pr\u00E9dicat"@fr;
|
||||
:range rdf:Property .
|
||||
|
||||
rdf:subject a rdf:Property;
|
||||
:domain rdf:Statement;
|
||||
:label "subject"@en,
|
||||
"sujet"@fr;
|
||||
:range :Resource .
|
||||
|
||||
rdf:value a rdf:Property;
|
||||
:label "object"@en,
|
||||
"value"@fr .
|
||||
|
||||
: :seeAlso <http://www.w3.org/2000/01/rdf-schema-more> .
|
36
packages/semweb/Tests/Turtle/rdfq-results.out
Normal file
36
packages/semweb/Tests/Turtle/rdfq-results.out
Normal file
@@ -0,0 +1,36 @@
|
||||
_:genid1 <http://jena.hpl.hp.com/2003/03/result-set#variable> "x" .
|
||||
_:genid1 <http://jena.hpl.hp.com/2003/03/result-set#value> "123"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
||||
_:genid2 <http://jena.hpl.hp.com/2003/03/result-set#variable> "y" .
|
||||
_:genid2 <http://jena.hpl.hp.com/2003/03/result-set#value> <http://example.com/resource1> .
|
||||
_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://jena.hpl.hp.com/2003/03/result-set#ResultSolution> .
|
||||
_:genid3 <http://jena.hpl.hp.com/2003/03/result-set#binding> _:genid1 .
|
||||
_:genid3 <http://jena.hpl.hp.com/2003/03/result-set#binding> _:genid2 .
|
||||
_:genid4 <http://jena.hpl.hp.com/2003/03/result-set#variable> "x" .
|
||||
_:genid4 <http://jena.hpl.hp.com/2003/03/result-set#value> "2003-01-21" .
|
||||
_:genid5 <http://jena.hpl.hp.com/2003/03/result-set#variable> "y" .
|
||||
_:genid5 <http://jena.hpl.hp.com/2003/03/result-set#value> <http://example.com/resource2> .
|
||||
_:genid6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://jena.hpl.hp.com/2003/03/result-set#ResultSolution> .
|
||||
_:genid6 <http://jena.hpl.hp.com/2003/03/result-set#binding> _:genid4 .
|
||||
_:genid6 <http://jena.hpl.hp.com/2003/03/result-set#binding> _:genid5 .
|
||||
_:genid7 <http://jena.hpl.hp.com/2003/03/result-set#variable> "x" .
|
||||
_:genid7 <http://jena.hpl.hp.com/2003/03/result-set#value> "anon1" .
|
||||
_:genid8 <http://jena.hpl.hp.com/2003/03/result-set#variable> "y" .
|
||||
_:genid8 <http://jena.hpl.hp.com/2003/03/result-set#value> _:a .
|
||||
_:genid9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://jena.hpl.hp.com/2003/03/result-set#ResultSolution> .
|
||||
_:genid9 <http://jena.hpl.hp.com/2003/03/result-set#binding> _:genid7 .
|
||||
_:genid9 <http://jena.hpl.hp.com/2003/03/result-set#binding> _:genid8 .
|
||||
_:genid10 <http://jena.hpl.hp.com/2003/03/result-set#variable> "x" .
|
||||
_:genid10 <http://jena.hpl.hp.com/2003/03/result-set#value> "anon2" .
|
||||
_:genid11 <http://jena.hpl.hp.com/2003/03/result-set#variable> "y" .
|
||||
_:genid11 <http://jena.hpl.hp.com/2003/03/result-set#value> _:a .
|
||||
_:genid12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://jena.hpl.hp.com/2003/03/result-set#ResultSolution> .
|
||||
_:genid12 <http://jena.hpl.hp.com/2003/03/result-set#binding> _:genid10 .
|
||||
_:genid12 <http://jena.hpl.hp.com/2003/03/result-set#binding> _:genid11 .
|
||||
<http://www.w3.org/2001/sw/DataAccess/df1/tests/rdfq-results.ttl> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://jena.hpl.hp.com/2003/03/result-set#ResultSet> .
|
||||
<http://www.w3.org/2001/sw/DataAccess/df1/tests/rdfq-results.ttl> <http://jena.hpl.hp.com/2003/03/result-set#size> "4"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
||||
<http://www.w3.org/2001/sw/DataAccess/df1/tests/rdfq-results.ttl> <http://jena.hpl.hp.com/2003/03/result-set#resultVariable> "x" .
|
||||
<http://www.w3.org/2001/sw/DataAccess/df1/tests/rdfq-results.ttl> <http://jena.hpl.hp.com/2003/03/result-set#resultVariable> "y" .
|
||||
<http://www.w3.org/2001/sw/DataAccess/df1/tests/rdfq-results.ttl> <http://jena.hpl.hp.com/2003/03/result-set#solution> _:genid3 .
|
||||
<http://www.w3.org/2001/sw/DataAccess/df1/tests/rdfq-results.ttl> <http://jena.hpl.hp.com/2003/03/result-set#solution> _:genid6 .
|
||||
<http://www.w3.org/2001/sw/DataAccess/df1/tests/rdfq-results.ttl> <http://jena.hpl.hp.com/2003/03/result-set#solution> _:genid9 .
|
||||
<http://www.w3.org/2001/sw/DataAccess/df1/tests/rdfq-results.ttl> <http://jena.hpl.hp.com/2003/03/result-set#solution> _:genid12 .
|
39
packages/semweb/Tests/Turtle/rdfq-results.ttl
Normal file
39
packages/semweb/Tests/Turtle/rdfq-results.ttl
Normal file
@@ -0,0 +1,39 @@
|
||||
# from http://www.w3.org/2003/03/rdfqr-tests/recording-query-results.html
|
||||
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
@prefix rs: <http://jena.hpl.hp.com/2003/03/result-set#> .
|
||||
|
||||
|
||||
<> rdf:type rs:ResultSet ;
|
||||
rs:size 4 ;
|
||||
rs:resultVariable "x" ; rs:resultVariable "y" ;
|
||||
rs:solution
|
||||
[ rdf:type rs:ResultSolution ;
|
||||
rs:binding [ rs:variable "x" ; rs:value 123 ] ;
|
||||
rs:binding [ rs:variable "y" ; rs:value <http://example.com/resource1> ]
|
||||
] ;
|
||||
|
||||
rs:solution
|
||||
[ rdf:type rs:ResultSolution ;
|
||||
rs:binding [ rs:variable "x" ;
|
||||
rs:value "2003-01-21" ] ;
|
||||
rs:binding [ rs:variable "y" ;
|
||||
rs:value <http://example.com/resource2> ]
|
||||
] ;
|
||||
|
||||
rs:solution
|
||||
[ rdf:type rs:ResultSolution ;
|
||||
rs:binding [ rs:variable "x" ;
|
||||
rs:value "anon1" ] ;
|
||||
rs:binding [ rs:variable "y" ;
|
||||
rs:value _:a ]
|
||||
] ;
|
||||
|
||||
rs:solution
|
||||
[ rdf:type rs:ResultSolution ;
|
||||
rs:binding [ rs:variable "x" ;
|
||||
rs:value "anon2" ] ;
|
||||
rs:binding [ rs:variable "y" ;
|
||||
rs:value _:a ]
|
||||
] ;
|
||||
.
|
131
packages/semweb/Tests/Turtle/rdfs-namespace.out
Normal file
131
packages/semweb/Tests/Turtle/rdfs-namespace.out
Normal file
@@ -0,0 +1,131 @@
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#comment> "Indicates membership of a class" .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#label> "type"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> <http://www.w3.org/2000/01/rdf-schema#comment> "A collection of alternatives."@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> <http://www.w3.org/2000/01/rdf-schema#label> "Alt"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Container> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> <http://www.w3.org/2000/01/rdf-schema#comment> "An unordered collection."@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> <http://www.w3.org/2000/01/rdf-schema#label> "Bag"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Container> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://www.w3.org/2000/01/rdf-schema#comment> "The concept of a property." .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://www.w3.org/2000/01/rdf-schema#label> "Property"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> <http://www.w3.org/2000/01/rdf-schema#comment> "An ordered collection."@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> <http://www.w3.org/2000/01/rdf-schema#label> "Seq"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Container> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> <http://www.w3.org/2000/01/rdf-schema#comment> "The class of RDF statements." .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> <http://www.w3.org/2000/01/rdf-schema#label> "Statement"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://www.w3.org/2000/01/rdf-schema#comment> "The object of an RDF statement." .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://www.w3.org/2000/01/rdf-schema#label> "object"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.w3.org/2000/01/rdf-schema#comment> "the predicate of an RDF statement." .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.w3.org/2000/01/rdf-schema#label> "predicate"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://www.w3.org/2000/01/rdf-schema#comment> "The subject of an RDF statement." .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://www.w3.org/2000/01/rdf-schema#label> "subject"@en .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#value> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#value> <http://www.w3.org/2000/01/rdf-schema#comment> "Identifies the principal value (usually a string) of a property when the property value is a structured resource" .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#value> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#value> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#value> <http://www.w3.org/2000/01/rdf-schema#label> "value"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/2000/01/rdf-schema-more> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Class> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Class> <http://www.w3.org/2000/01/rdf-schema#comment> "The concept of Class" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Class> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Class> <http://www.w3.org/2000/01/rdf-schema#label> "Class"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Class> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Container> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Container> <http://www.w3.org/2000/01/rdf-schema#comment> "This represents the set Containers." .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Container> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Container> <http://www.w3.org/2000/01/rdf-schema#label> "Container"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Container> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ContainerMembershipProperty> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ContainerMembershipProperty> <http://www.w3.org/2000/01/rdf-schema#comment> "The container membership properties, rdf:1, rdf:2, ..., all of which are sub-properties of 'member'." .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ContainerMembershipProperty> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ContainerMembershipProperty> <http://www.w3.org/2000/01/rdf-schema#label> "ContainerMembershipProperty"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#ContainerMembershipProperty> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Literal> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Literal> <http://www.w3.org/2000/01/rdf-schema#comment> "This represents the set of atomic values, eg. textual strings." .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Literal> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Literal> <http://www.w3.org/2000/01/rdf-schema#label> "Literal"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Resource> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Resource> <http://www.w3.org/2000/01/rdf-schema#comment> "The class resource, everything." .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Resource> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#Resource> <http://www.w3.org/2000/01/rdf-schema#label> "Resource"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#comment> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#comment> <http://www.w3.org/2000/01/rdf-schema#comment> "Use this for descriptions" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#comment> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#comment> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#comment> <http://www.w3.org/2000/01/rdf-schema#label> "comment"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#comment> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Literal> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#comment> "A domain class for a property type" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#label> "domain"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#comment> "Indicates the namespace of a resource" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#label> "isDefinedBy"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/2000/01/rdf-schema#seeAlso> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#label> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#label> <http://www.w3.org/2000/01/rdf-schema#comment> "Provides a human-readable version of a resource name." .
|
||||
<http://www.w3.org/2000/01/rdf-schema#label> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#label> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#label> <http://www.w3.org/2000/01/rdf-schema#label> "label"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#label> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Literal> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#member> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#member> <http://www.w3.org/2000/01/rdf-schema#comment> "a member of a container" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#member> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Container> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#member> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#member> <http://www.w3.org/2000/01/rdf-schema#label> "member"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#comment> "A range class for a property type" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#label> "range"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/2000/01/rdf-schema#comment> "A resource that provides information about the subject resource" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/2000/01/rdf-schema#label> "seeAlso"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#comment> "Indicates membership of a class" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#label> "subClassOf"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/2000/01/rdf-schema#comment> "Indicates specialization of properties" .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/2000/01/rdf-schema#label> "subPropertyOf"@en .
|
||||
<http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
160
packages/semweb/Tests/Turtle/rdfs-namespace.ttl
Normal file
160
packages/semweb/Tests/Turtle/rdfs-namespace.ttl
Normal file
@@ -0,0 +1,160 @@
|
||||
# RDFS Namespace document converted into Turtle
|
||||
|
||||
@prefix : <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
|
||||
rdf:type a rdf:Property;
|
||||
:comment "Indicates membership of a class";
|
||||
:domain :Resource;
|
||||
:isDefinedBy rdf:;
|
||||
:label "type"@en;
|
||||
:range :Class .
|
||||
|
||||
rdf:Alt a :Class;
|
||||
:comment "A collection of alternatives."@en;
|
||||
:isDefinedBy rdf:;
|
||||
:label "Alt"@en;
|
||||
:subClassOf :Container .
|
||||
|
||||
rdf:Bag a :Class;
|
||||
:comment "An unordered collection."@en;
|
||||
:isDefinedBy rdf:;
|
||||
:label "Bag"@en;
|
||||
:subClassOf :Container .
|
||||
|
||||
rdf:Property a :Class;
|
||||
:comment "The concept of a property.";
|
||||
:isDefinedBy rdf:;
|
||||
:label "Property"@en;
|
||||
:subClassOf :Resource .
|
||||
|
||||
rdf:Seq a :Class;
|
||||
:comment "An ordered collection."@en;
|
||||
:isDefinedBy rdf:;
|
||||
:label "Seq"@en;
|
||||
:subClassOf :Container .
|
||||
|
||||
rdf:Statement a :Class;
|
||||
:comment "The class of RDF statements.";
|
||||
:isDefinedBy rdf:;
|
||||
:label "Statement"@en;
|
||||
:subClassOf :Resource .
|
||||
|
||||
rdf:object a rdf:Property;
|
||||
:comment "The object of an RDF statement.";
|
||||
:domain rdf:Statement;
|
||||
:isDefinedBy rdf:;
|
||||
:label "object"@en .
|
||||
|
||||
rdf:predicate a rdf:Property;
|
||||
:comment "the predicate of an RDF statement.";
|
||||
:domain rdf:Statement;
|
||||
:isDefinedBy rdf:;
|
||||
:label "predicate"@en;
|
||||
:range rdf:Property .
|
||||
|
||||
rdf:subject a rdf:Property;
|
||||
:comment "The subject of an RDF statement.";
|
||||
:domain rdf:Statement;
|
||||
:isDefinedBy rdf:;
|
||||
:label "subject"@en;
|
||||
:range :Resource .
|
||||
|
||||
rdf:value a rdf:Property;
|
||||
:comment "Identifies the principal value (usually a string) of a property when the property value is a structured resource";
|
||||
:domain :Resource;
|
||||
:isDefinedBy rdf:;
|
||||
:label "value"@en .
|
||||
|
||||
: :seeAlso <http://www.w3.org/2000/01/rdf-schema-more> .
|
||||
|
||||
:Class a :Class;
|
||||
:comment "The concept of Class";
|
||||
:isDefinedBy :;
|
||||
:label "Class"@en;
|
||||
:subClassOf :Resource .
|
||||
|
||||
:Container a :Class;
|
||||
:comment "This represents the set Containers.";
|
||||
:isDefinedBy :;
|
||||
:label "Container"@en;
|
||||
:subClassOf :Resource .
|
||||
|
||||
:ContainerMembershipProperty a :Class;
|
||||
:comment "The container membership properties, rdf:1, rdf:2, ..., all of which are sub-properties of 'member'.";
|
||||
:isDefinedBy :;
|
||||
:label "ContainerMembershipProperty"@en;
|
||||
:subClassOf rdf:Property .
|
||||
|
||||
:Literal a :Class;
|
||||
:comment "This represents the set of atomic values, eg. textual strings.";
|
||||
:isDefinedBy :;
|
||||
:label "Literal"@en .
|
||||
|
||||
:Resource a :Class;
|
||||
:comment "The class resource, everything.";
|
||||
:isDefinedBy :;
|
||||
:label "Resource"@en .
|
||||
|
||||
:comment a rdf:Property;
|
||||
:comment "Use this for descriptions";
|
||||
:domain :Resource;
|
||||
:isDefinedBy :;
|
||||
:label "comment"@en;
|
||||
:range :Literal .
|
||||
|
||||
:domain a rdf:Property;
|
||||
:comment "A domain class for a property type";
|
||||
:domain rdf:Property;
|
||||
:isDefinedBy :;
|
||||
:label "domain"@en;
|
||||
:range :Class .
|
||||
|
||||
:isDefinedBy a rdf:Property;
|
||||
:comment "Indicates the namespace of a resource";
|
||||
:domain :Resource;
|
||||
:isDefinedBy :;
|
||||
:label "isDefinedBy"@en;
|
||||
:range :Resource;
|
||||
:subPropertyOf :seeAlso .
|
||||
|
||||
:label a rdf:Property;
|
||||
:comment "Provides a human-readable version of a resource name.";
|
||||
:domain :Resource;
|
||||
:isDefinedBy :;
|
||||
:label "label"@en;
|
||||
:range :Literal .
|
||||
|
||||
:member a rdf:Property;
|
||||
:comment "a member of a container";
|
||||
:domain :Container;
|
||||
:isDefinedBy :;
|
||||
:label "member"@en .
|
||||
|
||||
:range a rdf:Property;
|
||||
:comment "A range class for a property type";
|
||||
:domain rdf:Property;
|
||||
:isDefinedBy :;
|
||||
:label "range"@en;
|
||||
:range :Class .
|
||||
|
||||
:seeAlso a rdf:Property;
|
||||
:comment "A resource that provides information about the subject resource";
|
||||
:domain :Resource;
|
||||
:isDefinedBy :;
|
||||
:label "seeAlso"@en;
|
||||
:range :Resource .
|
||||
|
||||
:subClassOf a rdf:Property;
|
||||
:comment "Indicates membership of a class";
|
||||
:domain :Class;
|
||||
:isDefinedBy :;
|
||||
:label "subClassOf"@en;
|
||||
:range :Class .
|
||||
|
||||
:subPropertyOf a rdf:Property;
|
||||
:comment "Indicates specialization of properties";
|
||||
:domain rdf:Property;
|
||||
:isDefinedBy :;
|
||||
:label "subPropertyOf"@en;
|
||||
:range rdf:Property .
|
1
packages/semweb/Tests/Turtle/test-00.out
Normal file
1
packages/semweb/Tests/Turtle/test-00.out
Normal file
@@ -0,0 +1 @@
|
||||
_:genid1 <http://www.w3.org/2001/sw/DataAccess/df1/tests/test-00.ttl#x> <http://www.w3.org/2001/sw/DataAccess/df1/tests/test-00.ttl#y> .
|
2
packages/semweb/Tests/Turtle/test-00.ttl
Normal file
2
packages/semweb/Tests/Turtle/test-00.ttl
Normal file
@@ -0,0 +1,2 @@
|
||||
@prefix : <#> .
|
||||
[] :x :y .
|
3
packages/semweb/Tests/Turtle/test-01.out
Normal file
3
packages/semweb/Tests/Turtle/test-01.out
Normal file
@@ -0,0 +1,3 @@
|
||||
<http://example.org/base1#a> <http://example.org/base1#b> <http://example.org/base1#c> .
|
||||
<http://example.org/base2#a> <http://example.org/base2#b> <http://example.org/base2#c> .
|
||||
<http://example.org/base1#a> <http://example.org/base2#a> <http://example.org/base3#a> .
|
7
packages/semweb/Tests/Turtle/test-01.ttl
Normal file
7
packages/semweb/Tests/Turtle/test-01.ttl
Normal file
@@ -0,0 +1,7 @@
|
||||
# Test @prefix and qnames
|
||||
@prefix : <http://example.org/base1#> .
|
||||
@prefix a: <http://example.org/base2#> .
|
||||
@prefix b: <http://example.org/base3#> .
|
||||
:a :b :c .
|
||||
a:a a:b a:c .
|
||||
:a a:a b:a .
|
3
packages/semweb/Tests/Turtle/test-02.out
Normal file
3
packages/semweb/Tests/Turtle/test-02.out
Normal file
@@ -0,0 +1,3 @@
|
||||
<http://example.org/base#a> <http://example.org/base#b> <http://example.org/base#c> .
|
||||
<http://example.org/base#a> <http://example.org/base#b> <http://example.org/base#d> .
|
||||
<http://example.org/base#a> <http://example.org/base#b> <http://example.org/base#e> .
|
5
packages/semweb/Tests/Turtle/test-02.ttl
Normal file
5
packages/semweb/Tests/Turtle/test-02.ttl
Normal file
@@ -0,0 +1,5 @@
|
||||
# Test , operator
|
||||
@prefix : <http://example.org/base#> .
|
||||
:a :b :c,
|
||||
:d,
|
||||
:e .
|
3
packages/semweb/Tests/Turtle/test-03.out
Normal file
3
packages/semweb/Tests/Turtle/test-03.out
Normal file
@@ -0,0 +1,3 @@
|
||||
<http://example.org/base#a> <http://example.org/base#b> <http://example.org/base#c> .
|
||||
<http://example.org/base#a> <http://example.org/base#d> <http://example.org/base#e> .
|
||||
<http://example.org/base#a> <http://example.org/base#f> <http://example.org/base#g> .
|
5
packages/semweb/Tests/Turtle/test-03.ttl
Normal file
5
packages/semweb/Tests/Turtle/test-03.ttl
Normal file
@@ -0,0 +1,5 @@
|
||||
# Test ; operator
|
||||
@prefix : <http://example.org/base#> .
|
||||
:a :b :c ;
|
||||
:d :e ;
|
||||
:f :g .
|
2
packages/semweb/Tests/Turtle/test-04.out
Normal file
2
packages/semweb/Tests/Turtle/test-04.out
Normal file
@@ -0,0 +1,2 @@
|
||||
_:genid1 <http://example.org/base#a> <http://example.org/base#b> .
|
||||
<http://example.org/base#c> <http://example.org/base#d> _:genid2 .
|
4
packages/semweb/Tests/Turtle/test-04.ttl
Normal file
4
packages/semweb/Tests/Turtle/test-04.ttl
Normal file
@@ -0,0 +1,4 @@
|
||||
# Test empty [] operator; not allowed as predicate
|
||||
@prefix : <http://example.org/base#> .
|
||||
[] :a :b .
|
||||
:c :d [] .
|
4
packages/semweb/Tests/Turtle/test-05.out
Normal file
4
packages/semweb/Tests/Turtle/test-05.out
Normal file
@@ -0,0 +1,4 @@
|
||||
_:genid1 <http://example.org/base#a> <http://example.org/base#b> .
|
||||
_:genid1 <http://example.org/base#c> <http://example.org/base#d> .
|
||||
_:genid2 <http://example.org/base#g> <http://example.org/base#h> .
|
||||
<http://example.org/base#e> <http://example.org/base#f> _:genid2 .
|
4
packages/semweb/Tests/Turtle/test-05.ttl
Normal file
4
packages/semweb/Tests/Turtle/test-05.ttl
Normal file
@@ -0,0 +1,4 @@
|
||||
# Test non empty [] operator; not allowed as predicate
|
||||
@prefix : <http://example.org/base#> .
|
||||
[ :a :b ] :c :d .
|
||||
:e :f [ :g :h ] .
|
1
packages/semweb/Tests/Turtle/test-06.out
Normal file
1
packages/semweb/Tests/Turtle/test-06.out
Normal file
@@ -0,0 +1 @@
|
||||
<http://example.org/base#a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/base#b> .
|
3
packages/semweb/Tests/Turtle/test-06.ttl
Normal file
3
packages/semweb/Tests/Turtle/test-06.ttl
Normal file
@@ -0,0 +1,3 @@
|
||||
# 'a' only allowed as a predicate
|
||||
@prefix : <http://example.org/base#> .
|
||||
:a a :b .
|
5
packages/semweb/Tests/Turtle/test-07.out
Normal file
5
packages/semweb/Tests/Turtle/test-07.out
Normal file
@@ -0,0 +1,5 @@
|
||||
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "banana" .
|
||||
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
|
||||
_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "apple" .
|
||||
_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid1 .
|
||||
<http://example.org/stuff/1.0/a> <http://example.org/stuff/1.0/b> _:genid2 .
|
3
packages/semweb/Tests/Turtle/test-07.ttl
Normal file
3
packages/semweb/Tests/Turtle/test-07.ttl
Normal file
@@ -0,0 +1,3 @@
|
||||
@prefix : <http://example.org/stuff/1.0/> .
|
||||
:a :b ( "apple" "banana" ) .
|
||||
|
1
packages/semweb/Tests/Turtle/test-08.out
Normal file
1
packages/semweb/Tests/Turtle/test-08.out
Normal file
@@ -0,0 +1 @@
|
||||
<http://example.org/stuff/1.0/a> <http://example.org/stuff/1.0/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
|
3
packages/semweb/Tests/Turtle/test-08.ttl
Normal file
3
packages/semweb/Tests/Turtle/test-08.ttl
Normal file
@@ -0,0 +1,3 @@
|
||||
@prefix : <http://example.org/stuff/1.0/> .
|
||||
:a :b ( ) .
|
||||
|
4
packages/semweb/Tests/Turtle/test-09.out
Normal file
4
packages/semweb/Tests/Turtle/test-09.out
Normal file
@@ -0,0 +1,4 @@
|
||||
_:hasParent <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
|
||||
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
|
||||
_:genid1 <http://www.w3.org/2002/07/owl#onProperty> _:hasParent .
|
||||
_:genid1 <http://www.w3.org/2002/07/owl#maxCardinality> "2"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
10
packages/semweb/Tests/Turtle/test-09.ttl
Normal file
10
packages/semweb/Tests/Turtle/test-09.ttl
Normal file
@@ -0,0 +1,10 @@
|
||||
# Test integer datatyped literals using an OWL cardinality constraint
|
||||
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
||||
|
||||
# based on examples in the OWL Reference
|
||||
|
||||
_:hasParent a owl:ObjectProperty .
|
||||
|
||||
[] a owl:Restriction ;
|
||||
owl:onProperty _:hasParent ;
|
||||
owl:maxCardinality 2 .
|
5
packages/semweb/Tests/Turtle/test-10.out
Normal file
5
packages/semweb/Tests/Turtle/test-10.out
Normal file
@@ -0,0 +1,5 @@
|
||||
<http://example.org/res1> <http://example.org/prop1> "000000"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
||||
<http://example.org/res2> <http://example.org/prop2> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
||||
<http://example.org/res3> <http://example.org/prop3> "000001"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
||||
<http://example.org/res4> <http://example.org/prop4> "2"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
||||
<http://example.org/res5> <http://example.org/prop5> "4"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
5
packages/semweb/Tests/Turtle/test-10.ttl
Normal file
5
packages/semweb/Tests/Turtle/test-10.ttl
Normal file
@@ -0,0 +1,5 @@
|
||||
<http://example.org/res1> <http://example.org/prop1> 000000 .
|
||||
<http://example.org/res2> <http://example.org/prop2> 0 .
|
||||
<http://example.org/res3> <http://example.org/prop3> 000001 .
|
||||
<http://example.org/res4> <http://example.org/prop4> 2 .
|
||||
<http://example.org/res5> <http://example.org/prop5> 4 .
|
4
packages/semweb/Tests/Turtle/test-11.out
Normal file
4
packages/semweb/Tests/Turtle/test-11.out
Normal file
@@ -0,0 +1,4 @@
|
||||
<http://example.org/ex1#foo-bar> <http://example.org/ex1#foo_bar> "a" .
|
||||
<http://example.org/ex2#foo-bar> <http://example.org/ex2#foo_bar> "b" .
|
||||
<http://example.org/ex3#foo-bar> <http://example.org/ex3#foo_bar> "c" .
|
||||
<http://example.org/ex4#foo-bar> <http://example.org/ex4#foo_bar> "d" .
|
10
packages/semweb/Tests/Turtle/test-11.ttl
Normal file
10
packages/semweb/Tests/Turtle/test-11.ttl
Normal file
@@ -0,0 +1,10 @@
|
||||
# Tests for - and _ in names, qnames
|
||||
@prefix ex1: <http://example.org/ex1#> .
|
||||
@prefix ex-2: <http://example.org/ex2#> .
|
||||
@prefix ex3_: <http://example.org/ex3#> .
|
||||
@prefix ex4-: <http://example.org/ex4#> .
|
||||
|
||||
ex1:foo-bar ex1:foo_bar "a" .
|
||||
ex-2:foo-bar ex-2:foo_bar "b" .
|
||||
ex3_:foo-bar ex3_:foo_bar "c" .
|
||||
ex4-:foo-bar ex4-:foo_bar "d" .
|
4
packages/semweb/Tests/Turtle/test-12.out
Normal file
4
packages/semweb/Tests/Turtle/test-12.out
Normal file
@@ -0,0 +1,4 @@
|
||||
<http://example.org/ex#foo> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
|
||||
<http://example.org/ex#foo> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
|
||||
<http://example.org/ex#foo> <http://example.org/myprop#_abc> "def" .
|
||||
<http://example.org/ex#foo> <http://example.org/myprop#_345> "678" .
|
9
packages/semweb/Tests/Turtle/test-12.ttl
Normal file
9
packages/semweb/Tests/Turtle/test-12.ttl
Normal file
@@ -0,0 +1,9 @@
|
||||
# Tests for rdf:_<numbers> and other qnames starting with _
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
@prefix ex: <http://example.org/ex#> .
|
||||
@prefix : <http://example.org/myprop#> .
|
||||
|
||||
ex:foo rdf:_1 "1" .
|
||||
ex:foo rdf:_2 "2" .
|
||||
ex:foo :_abc "def" .
|
||||
ex:foo :_345 "678" .
|
2
packages/semweb/Tests/Turtle/test-13.out
Normal file
2
packages/semweb/Tests/Turtle/test-13.out
Normal file
@@ -0,0 +1,2 @@
|
||||
_:genid1 <http://example.org/ron> _:genid2 .
|
||||
<http://example.org/ron> <http://example.org/ron> <http://example.org/ron> .
|
7
packages/semweb/Tests/Turtle/test-13.ttl
Normal file
7
packages/semweb/Tests/Turtle/test-13.ttl
Normal file
@@ -0,0 +1,7 @@
|
||||
# Test for : allowed
|
||||
@prefix : <http://example.org/ron> .
|
||||
|
||||
[] : [] .
|
||||
|
||||
: : : .
|
||||
|
10000
packages/semweb/Tests/Turtle/test-14.out
Normal file
10000
packages/semweb/Tests/Turtle/test-14.out
Normal file
File diff suppressed because it is too large
Load Diff
10002
packages/semweb/Tests/Turtle/test-14.ttl
Normal file
10002
packages/semweb/Tests/Turtle/test-14.ttl
Normal file
File diff suppressed because it is too large
Load Diff
10000
packages/semweb/Tests/Turtle/test-15.out
Normal file
10000
packages/semweb/Tests/Turtle/test-15.out
Normal file
File diff suppressed because it is too large
Load Diff
3
packages/semweb/Tests/Turtle/test-15.ttl
Normal file
3
packages/semweb/Tests/Turtle/test-15.ttl
Normal file
File diff suppressed because one or more lines are too long
10000
packages/semweb/Tests/Turtle/test-16.out
Normal file
10000
packages/semweb/Tests/Turtle/test-16.out
Normal file
File diff suppressed because it is too large
Load Diff
10002
packages/semweb/Tests/Turtle/test-16.ttl
Normal file
10002
packages/semweb/Tests/Turtle/test-16.ttl
Normal file
File diff suppressed because it is too large
Load Diff
1
packages/semweb/Tests/Turtle/test-17.out
Normal file
1
packages/semweb/Tests/Turtle/test-17.out
Normal file
@@ -0,0 +1 @@
|
||||
<http://example.org/ex#a> <http://example.org/ex#b> "a long\n\tliteral\nwith\nnewlines" .
|
6
packages/semweb/Tests/Turtle/test-17.ttl
Normal file
6
packages/semweb/Tests/Turtle/test-17.ttl
Normal file
@@ -0,0 +1,6 @@
|
||||
# Test long literal
|
||||
@prefix : <http://example.org/ex#> .
|
||||
:a :b """a long
|
||||
literal
|
||||
with
|
||||
newlines""" .
|
2
packages/semweb/Tests/Turtle/test-18.out
Normal file
2
packages/semweb/Tests/Turtle/test-18.out
Normal file
@@ -0,0 +1,2 @@
|
||||
<http://example.org/foo#a> <http://example.org/foo#b> "\nthis \ris a \U00015678long\t\nliteral\uABCD\n" .
|
||||
<http://example.org/foo#d> <http://example.org/foo#e> "\tThis \uABCDis\r \U00015678another\n\none\n" .
|
9
packages/semweb/Tests/Turtle/test-18.ttl
Normal file
9
packages/semweb/Tests/Turtle/test-18.ttl
Normal file
@@ -0,0 +1,9 @@
|
||||
@prefix : <http://example.org/foo#> .
|
||||
|
||||
:a :b """\nthis \ris a \U00015678long\t
|
||||
literal\uABCD
|
||||
""" .
|
||||
|
||||
:d :e """\tThis \uABCDis\r \U00015678another\n
|
||||
one
|
||||
""" .
|
1
packages/semweb/Tests/Turtle/test-19.out
Normal file
1
packages/semweb/Tests/Turtle/test-19.out
Normal file
@@ -0,0 +1 @@
|
||||
<http://example.org/#a> <http://example.org/#b> "1.0"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
4
packages/semweb/Tests/Turtle/test-19.ttl
Normal file
4
packages/semweb/Tests/Turtle/test-19.ttl
Normal file
@@ -0,0 +1,4 @@
|
||||
@prefix : <http://example.org/#> .
|
||||
|
||||
:a :b 1.0 .
|
||||
|
2
packages/semweb/Tests/Turtle/test-20.out
Normal file
2
packages/semweb/Tests/Turtle/test-20.out
Normal file
@@ -0,0 +1,2 @@
|
||||
<http://example.org/#a> <http://example.org/#b> "" .
|
||||
<http://example.org/#c> <http://example.org/#d> "" .
|
6
packages/semweb/Tests/Turtle/test-20.ttl
Normal file
6
packages/semweb/Tests/Turtle/test-20.ttl
Normal file
@@ -0,0 +1,6 @@
|
||||
@prefix : <http://example.org/#> .
|
||||
|
||||
:a :b "" .
|
||||
|
||||
:c :d """""" .
|
||||
|
3
packages/semweb/Tests/Turtle/test-21.out
Normal file
3
packages/semweb/Tests/Turtle/test-21.out
Normal file
@@ -0,0 +1,3 @@
|
||||
<http://example.org#a> <http://example.org#b> "1.0"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org#c> <http://example.org#d> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
||||
<http://example.org#e> <http://example.org#f> "1.0e0"^^<http://www.w3.org/2001/XMLSchema#double> .
|
4
packages/semweb/Tests/Turtle/test-21.ttl
Normal file
4
packages/semweb/Tests/Turtle/test-21.ttl
Normal file
@@ -0,0 +1,4 @@
|
||||
@prefix : <http://example.org#> .
|
||||
:a :b 1.0 .
|
||||
:c :d 1 .
|
||||
:e :f 1.0e0 .
|
3
packages/semweb/Tests/Turtle/test-22.out
Normal file
3
packages/semweb/Tests/Turtle/test-22.out
Normal file
@@ -0,0 +1,3 @@
|
||||
<http://example.org#a> <http://example.org#b> "-1.0"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org#c> <http://example.org#d> "-1"^^<http://www.w3.org/2001/XMLSchema#integer> .
|
||||
<http://example.org#e> <http://example.org#f> "-1.0e0"^^<http://www.w3.org/2001/XMLSchema#double> .
|
4
packages/semweb/Tests/Turtle/test-22.ttl
Normal file
4
packages/semweb/Tests/Turtle/test-22.ttl
Normal file
@@ -0,0 +1,4 @@
|
||||
@prefix : <http://example.org#> .
|
||||
:a :b -1.0 .
|
||||
:c :d -1 .
|
||||
:e :f -1.0e0 .
|
1
packages/semweb/Tests/Turtle/test-23.out
Normal file
1
packages/semweb/Tests/Turtle/test-23.out
Normal file
@@ -0,0 +1 @@
|
||||
<http://example.org/ex#a> <http://example.org/ex#b> "John said: \"Hello World!\"" .
|
3
packages/semweb/Tests/Turtle/test-23.ttl
Normal file
3
packages/semweb/Tests/Turtle/test-23.ttl
Normal file
@@ -0,0 +1,3 @@
|
||||
# Test long literal
|
||||
@prefix : <http://example.org/ex#> .
|
||||
:a :b """John said: "Hello World!\"""" .
|
2
packages/semweb/Tests/Turtle/test-24.out
Normal file
2
packages/semweb/Tests/Turtle/test-24.out
Normal file
@@ -0,0 +1,2 @@
|
||||
<http://example.org#a> <http://example.org#b> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
|
||||
<http://example.org#c> <http://example.org#d> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
|
3
packages/semweb/Tests/Turtle/test-24.ttl
Normal file
3
packages/semweb/Tests/Turtle/test-24.ttl
Normal file
@@ -0,0 +1,3 @@
|
||||
@prefix : <http://example.org#> .
|
||||
:a :b true .
|
||||
:c :d false .
|
7
packages/semweb/Tests/Turtle/test-25.out
Normal file
7
packages/semweb/Tests/Turtle/test-25.out
Normal file
@@ -0,0 +1,7 @@
|
||||
<http://example.org/#a> <http://example.org/#b> <http://example.org/#c> .
|
||||
<http://example.org/#d> <http://example.org/#e> <http://example.org/#f> .
|
||||
<http://example.org/#g> <http://example.org/#h> <http://example.org/#i> .
|
||||
<http://example.org/#g> <http://example.org/#h> <http://example.org/#j> .
|
||||
<http://example.org/#k> <http://example.org/#l> <http://example.org/#m> .
|
||||
<http://example.org/#k> <http://example.org/#n> <http://example.org/#o> .
|
||||
<http://example.org/#k> <http://example.org/#p> <http://example.org/#q> .
|
14
packages/semweb/Tests/Turtle/test-25.ttl
Normal file
14
packages/semweb/Tests/Turtle/test-25.ttl
Normal file
@@ -0,0 +1,14 @@
|
||||
# comment test
|
||||
@prefix : <http://example.org/#> .
|
||||
:a :b :c . # end of line comment
|
||||
:d # ignore me
|
||||
:e # and me
|
||||
:f # and me
|
||||
.
|
||||
:g :h #ignore me
|
||||
:i, # and me
|
||||
:j . # and me
|
||||
|
||||
:k :l :m ; #ignore me
|
||||
:n :o ; # and me
|
||||
:p :q . # and me
|
1
packages/semweb/Tests/Turtle/test-26.out
Normal file
1
packages/semweb/Tests/Turtle/test-26.out
Normal file
@@ -0,0 +1 @@
|
||||
<http://example.org/#a> <http://example.org/#b> <http://example.org/#c> .
|
4
packages/semweb/Tests/Turtle/test-26.ttl
Normal file
4
packages/semweb/Tests/Turtle/test-26.ttl
Normal file
@@ -0,0 +1,4 @@
|
||||
# comment line with no final newline test
|
||||
@prefix : <http://example.org/#> .
|
||||
:a :b :c .
|
||||
#foo
|
1
packages/semweb/Tests/Turtle/test-27.out
Normal file
1
packages/semweb/Tests/Turtle/test-27.out
Normal file
@@ -0,0 +1 @@
|
||||
<http://example.org/bar#blah> <http://example.org/bar#blah> <http://example.org/bar#blah> .
|
5
packages/semweb/Tests/Turtle/test-27.ttl
Normal file
5
packages/semweb/Tests/Turtle/test-27.ttl
Normal file
@@ -0,0 +1,5 @@
|
||||
@prefix foo: <http://example.org/foo#> .
|
||||
@prefix foo: <http://example.org/bar#> .
|
||||
|
||||
foo:blah foo:blah foo:blah .
|
||||
|
6
packages/semweb/Tests/Turtle/test-28-out.ttl
Normal file
6
packages/semweb/Tests/Turtle/test-28-out.ttl
Normal file
@@ -0,0 +1,6 @@
|
||||
@base <http://www.w3.org/2001/sw/DataAccess/df1/tests/test-28.ttl> .
|
||||
@prefix rdf: <../../../../../1999/02/22-rdf-syntax-ns#> .
|
||||
|
||||
<http://example.org/foo>
|
||||
<http://example.org/bar> 2.345, 1, 1.0, 1., 1.000000000, 2.3, 2.234000005, 2.2340000005, 2.23400000005, 2.234000000005, 2.2340000000005, 2.23400000000005, 2.234000000000005, 2.2340000000000005, 2.23400000000000005, 2.234000000000000005, 2.2340000000000000005, 2.23400000000000000005, 2.234000000000000000005, 2.2340000000000000000005, 2.23400000000000000000005, 1.2345678901234567890123457890 .
|
||||
|
22
packages/semweb/Tests/Turtle/test-28.out
Normal file
22
packages/semweb/Tests/Turtle/test-28.out
Normal file
@@ -0,0 +1,22 @@
|
||||
<http://example.org/foo> <http://example.org/bar> "2.345"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "1.0"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "1.0"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "1.0"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "1.0"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.30"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.234000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.2340000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.23400000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.234000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.2340000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.23400000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.234000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.2340000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.234"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.234"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.234"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.234"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.234"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.234"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.234"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "1.2345678901234567"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
22
packages/semweb/Tests/Turtle/test-28.ttl
Normal file
22
packages/semweb/Tests/Turtle/test-28.ttl
Normal file
@@ -0,0 +1,22 @@
|
||||
<http://example.org/foo> <http://example.org/bar> "2.345"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "1"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "1.0"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "1."^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "1.000000000"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.3"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.234000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.2340000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.23400000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.234000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.2340000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.23400000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.234000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.2340000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.23400000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.234000000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.2340000000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.23400000000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.234000000000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.2340000000000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "2.23400000000000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
||||
<http://example.org/foo> <http://example.org/bar> "1.2345678901234567890123457890"^^<http://www.w3.org/2001/XMLSchema#decimal> .
|
1
packages/semweb/Tests/Turtle/test-29.out
Normal file
1
packages/semweb/Tests/Turtle/test-29.out
Normal file
@@ -0,0 +1 @@
|
||||
<http://example.org/node> <http://example.org/prop> <scheme:\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\t\n\u000B\u000C\r\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F !"#$%&'()*+,-./0123456789:/<=\u003E?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u007F> .
|
1
packages/semweb/Tests/Turtle/test-29.ttl
Normal file
1
packages/semweb/Tests/Turtle/test-29.ttl
Normal file
@@ -0,0 +1 @@
|
||||
<http://example.org/node> <http://example.org/prop> <scheme:\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\t\n\u000B\u000C\r\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F !"#$%&'()*+,-./0123456789:/<=\u003E?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u007F> .
|
5
packages/semweb/Tests/Turtle/test-30.out
Normal file
5
packages/semweb/Tests/Turtle/test-30.out
Normal file
@@ -0,0 +1,5 @@
|
||||
<http://www.w3.org/2001/sw/DataAccess/df1/tests/a1> <http://www.w3.org/2001/sw/DataAccess/df1/tests/b1> <http://www.w3.org/2001/sw/DataAccess/df1/tests/c1> .
|
||||
<http://example.org/ns/a2> <http://example.org/ns/b2> <http://example.org/ns/c2> .
|
||||
<http://example.org/ns/foo/a3> <http://example.org/ns/foo/b3> <http://example.org/ns/foo/c3> .
|
||||
<http://example.org/ns/foo/bar#a4> <http://example.org/ns/foo/bar#b4> <http://example.org/ns/foo/bar#c4> .
|
||||
<http://example.org/ns2#a5> <http://example.org/ns2#b5> <http://example.org/ns2#c5> .
|
12
packages/semweb/Tests/Turtle/test-30.ttl
Normal file
12
packages/semweb/Tests/Turtle/test-30.ttl
Normal file
@@ -0,0 +1,12 @@
|
||||
# In-scope base URI is http://www.w3.org/2001/sw/DataAccess/df1/tests/ at this point
|
||||
<a1> <b1> <c1> .
|
||||
@base <http://example.org/ns/> .
|
||||
# In-scope base URI is http://example.org/ns/ at this point
|
||||
<a2> <http://example.org/ns/b2> <c2> .
|
||||
@base <foo/> .
|
||||
# In-scope base URI is http://example.org/ns/foo/ at this point
|
||||
<a3> <b3> <c3> .
|
||||
@prefix : <bar#> .
|
||||
:a4 :b4 :c4 .
|
||||
@prefix : <http://example.org/ns2#> .
|
||||
:a5 :b5 :c5 .
|
41
packages/semweb/Tests/lit.pl
Normal file
41
packages/semweb/Tests/lit.pl
Normal file
@@ -0,0 +1,41 @@
|
||||
:- module(lit,
|
||||
[ lit/0
|
||||
]).
|
||||
:- use_module('../rdf_db').
|
||||
|
||||
data(string, '').
|
||||
data(string, 'This is a nice string').
|
||||
|
||||
data(int, 0).
|
||||
data(int, -67).
|
||||
data(int, 327848).
|
||||
|
||||
data(float, 0.0).
|
||||
data(float, 48.25).
|
||||
|
||||
data(term, [let, us, test, a, list]).
|
||||
data(term, [let, us, test, another, list]).
|
||||
|
||||
create :-
|
||||
( data(Type, Value),
|
||||
rdf_assert(subject, Type, literal(Value)),
|
||||
fail
|
||||
; true
|
||||
).
|
||||
|
||||
lookup :-
|
||||
findall(T-V, (rdf(subject, T, X), X = literal(V)), Pairs),
|
||||
findall(T-V, data(T, V), Data),
|
||||
Data == Pairs.
|
||||
|
||||
|
||||
/*******************************
|
||||
* MAIN *
|
||||
*******************************/
|
||||
|
||||
lit :-
|
||||
rdf_reset_db,
|
||||
create,
|
||||
lookup.
|
||||
|
||||
|
32
packages/semweb/Tests/subprop.pl
Normal file
32
packages/semweb/Tests/subprop.pl
Normal file
@@ -0,0 +1,32 @@
|
||||
:- module(subprop,
|
||||
[ subprop/0
|
||||
]).
|
||||
:- use_module('../rdf_db').
|
||||
|
||||
rdf_db:ns(test, 'http://www.test.org/').
|
||||
|
||||
% :- rdf_debug(10).
|
||||
|
||||
t1 :-
|
||||
rdf_assert(test:a, rdfs:subPropertyOf, test:r1),
|
||||
rdf_assert(test:jan, test:a, literal(jan)).
|
||||
|
||||
t2 :-
|
||||
rdf_assert(test:a, rdfs:subPropertyOf, test:r1),
|
||||
rdf_assert(test:a, rdfs:subPropertyOf, test:r2),
|
||||
rdf_assert(test:jan, test:a, literal(jan)).
|
||||
|
||||
t3 :-
|
||||
rdf_assert(test:a, rdfs:subPropertyOf, test:r1),
|
||||
rdf_assert(test:a, rdfs:subPropertyOf, test:r2),
|
||||
rdf_assert(test:b, rdfs:subPropertyOf, test:r3),
|
||||
rdf_assert(test:b, rdfs:subPropertyOf, test:r4),
|
||||
rdf_assert(test:c, rdfs:subPropertyOf, test:a),
|
||||
rdf_assert(test:c, rdfs:subPropertyOf, test:b),
|
||||
rdf_assert(test:jan, test:a, literal(jan)).
|
||||
|
||||
subprop :-
|
||||
rdf_reset_db,
|
||||
t3,
|
||||
rdf_has(test:jan, test:r1, Name),
|
||||
Name == literal(jan).
|
17
packages/semweb/Tests/test-001.rdf
Normal file
17
packages/semweb/Tests/test-001.rdf
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!DOCTYPE rdf:RDF [
|
||||
<!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
|
||||
<!ENTITY test 'http://www.swi-prolog.org/ns/test/'>
|
||||
]>
|
||||
|
||||
<!-- Simple test data
|
||||
-->
|
||||
|
||||
<rdf:RDF xmlns:rdf="&rdf;"
|
||||
xmlns:test="&test;">
|
||||
|
||||
<test:Root>
|
||||
</test:Root>
|
||||
|
||||
</rdf:RDF>
|
BIN
packages/semweb/Tests/test-002.rdf.gz
Normal file
BIN
packages/semweb/Tests/test-002.rdf.gz
Normal file
Binary file not shown.
731
packages/semweb/atom.c
Normal file
731
packages/semweb/atom.c
Normal file
@@ -0,0 +1,731 @@
|
||||
/* $Id$
|
||||
|
||||
Part of the SWI-Prolog Semweb package
|
||||
|
||||
Author: Jan Wielemaker
|
||||
E-mail: wielemak@science.uva.nl
|
||||
WWW: http://www.swi-prolog.org
|
||||
Copyright (C): 2006, University of Amsterdam
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <SWI-Stream.h>
|
||||
#include <SWI-Prolog.h>
|
||||
#include "atom.h"
|
||||
#include "murmur.h"
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#define inline __inline
|
||||
#endif
|
||||
|
||||
#include "unicode_map.c"
|
||||
|
||||
|
||||
/*******************************
|
||||
* TEXT HANDLING *
|
||||
*******************************/
|
||||
|
||||
static inline int
|
||||
get_atom_text(atom_t atom, text *txt)
|
||||
{ if ( (txt->a = (const charA*)PL_atom_nchars(atom, &txt->length)) )
|
||||
{ txt->w = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
if ( (txt->w = (const charW*)PL_atom_wchars(atom, &txt->length)) )
|
||||
{ txt->a = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
inline wint_t
|
||||
fetch(const text *txt, int i)
|
||||
{ return txt->a ? (wint_t)txt->a[i] : (wint_t)txt->w[i];
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
fill_atom_info(atom_info *info)
|
||||
{ if ( !info->resolved )
|
||||
{ info->resolved = TRUE;
|
||||
|
||||
if ( !(info->rc=get_atom_text(info->handle, &info->text)) )
|
||||
{ info->text.a = NULL;
|
||||
info->text.w = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return info->rc;
|
||||
}
|
||||
|
||||
|
||||
/*******************************
|
||||
* COMPARE *
|
||||
*******************************/
|
||||
|
||||
static inline int
|
||||
cmpA(int c1, int c2, int *dl2)
|
||||
{ if ( c1 == c2 )
|
||||
{ return 0;
|
||||
} else
|
||||
{ int k1 = sort_pointA(c1);
|
||||
int k2 = sort_pointA(c2);
|
||||
int d;
|
||||
|
||||
if ( (d=((k1>>8)-(k2>>8))) == 0 )
|
||||
{ if ( *dl2 == 0 )
|
||||
*dl2 = (k1&0xff) - (k2&0xff);
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static inline int
|
||||
cmpW(int c1, int c2, int *dl2)
|
||||
{ if ( c1 == c2 )
|
||||
{ return 0;
|
||||
} else
|
||||
{ int k1 = sort_point(c1);
|
||||
int k2 = sort_point(c2);
|
||||
int d;
|
||||
|
||||
if ( (d=((k1>>8)-(k2>>8))) == 0 )
|
||||
{ if ( *dl2 == 0 )
|
||||
*dl2 = (k1&0xff) - (k2&0xff);
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
cmp_atom_info(atom_info *info, atom_t a2)
|
||||
{ text t2;
|
||||
int i;
|
||||
int dl2 = 0;
|
||||
size_t n;
|
||||
|
||||
if ( info->handle == a2 )
|
||||
return 0;
|
||||
|
||||
if ( !fill_atom_info(info) ||
|
||||
!get_atom_text(a2, &t2) )
|
||||
{ goto cmphandles; /* non-text atoms? */
|
||||
}
|
||||
|
||||
if ( info->text.a && t2.a )
|
||||
{ const charA *s1 = info->text.a;
|
||||
const charA *s2 = t2.a;
|
||||
int d;
|
||||
|
||||
while((d=cmpA(*s1, *s2, &dl2)) == 0)
|
||||
{ if ( *s1 == 0 )
|
||||
goto eq;
|
||||
s1++, s2++;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
n = (info->text.length < t2.length ? info->text.length : t2.length);
|
||||
|
||||
if ( info->text.w && t2.w )
|
||||
{ const charW *s1 = info->text.w;
|
||||
const charW *s2 = t2.w;
|
||||
|
||||
for(;;s1++, s2++)
|
||||
{ if ( n-- == 0 )
|
||||
{ if ( info->text.length == t2.length )
|
||||
goto eq;
|
||||
|
||||
return info->text.length < t2.length ? -1 : 1;
|
||||
} else
|
||||
{ int d;
|
||||
|
||||
if ( (d=cmpW(*s1, *s2, &dl2)) != 0 )
|
||||
return d;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(i=0; ; i++)
|
||||
{ if ( n-- == 0 )
|
||||
{ if ( info->text.length == t2.length )
|
||||
goto eq;
|
||||
|
||||
return info->text.length < t2.length ? -1 : 1;
|
||||
} else
|
||||
{ wint_t c1 = fetch(&info->text, i);
|
||||
wint_t c2 = fetch(&t2, i);
|
||||
int d;
|
||||
|
||||
if ( (d=cmpW(c1, c2, &dl2)) != 0 )
|
||||
return d;
|
||||
}
|
||||
}
|
||||
|
||||
eq:
|
||||
if ( dl2 )
|
||||
return dl2;
|
||||
|
||||
cmphandles:
|
||||
return info->handle < a2 ? -1 : 1; /* == already covered */
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
cmp_atoms(atom_t a1, atom_t a2)
|
||||
{ atom_info info = {0};
|
||||
|
||||
if ( a1 == a2 )
|
||||
return 0;
|
||||
|
||||
info.handle = a1;
|
||||
|
||||
return cmp_atom_info(&info, a2);
|
||||
}
|
||||
|
||||
|
||||
/*******************************
|
||||
* HASH *
|
||||
*******************************/
|
||||
|
||||
static unsigned int
|
||||
string_hashA(const char *s, size_t len)
|
||||
{ const unsigned char *t = (const unsigned char *)s;
|
||||
unsigned int hash = 0;
|
||||
|
||||
while( len>0 )
|
||||
{ unsigned char buf[256];
|
||||
unsigned char *o = buf-1;
|
||||
int cp = len > 256 ? 256 : (int)len;
|
||||
const unsigned char *e = t+cp;
|
||||
|
||||
t--;
|
||||
while(++t<e)
|
||||
*++o = sort_pointA(*t)>>8;
|
||||
hash ^= rdf_murmer_hash(buf, cp, MURMUR_SEED);
|
||||
|
||||
len -= cp;
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
||||
static unsigned int
|
||||
string_hashW(const wchar_t *t, size_t len)
|
||||
{ unsigned int hash = 0;
|
||||
|
||||
while( len>0 )
|
||||
{ unsigned short buf[256];
|
||||
unsigned short *o = buf;
|
||||
int cp = len > 256 ? 256 : (int)len;
|
||||
const wchar_t *e = t+cp;
|
||||
|
||||
while(t<e)
|
||||
*o++ = (short)(sort_point(*t++)>>8);
|
||||
hash ^= rdf_murmer_hash(buf, cp*sizeof(short), MURMUR_SEED);
|
||||
|
||||
len -= cp;
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
||||
unsigned int
|
||||
atom_hash_case(atom_t a)
|
||||
{ const char *s;
|
||||
const wchar_t *w;
|
||||
size_t len;
|
||||
|
||||
if ( (s = PL_atom_nchars(a, &len)) )
|
||||
return string_hashA(s, len);
|
||||
else if ( (w = PL_atom_wchars(a, &len)) )
|
||||
return string_hashW(w, len);
|
||||
else
|
||||
{ assert(0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************
|
||||
* FIND FIRST *
|
||||
*******************************/
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
Given an atom, return a new one that has all its characters modified
|
||||
such that it appears first in the set of atoms considered equal after
|
||||
case canonisation and diacritics removal. This is required for prefix
|
||||
search to find the first atom of the set.
|
||||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
atom_t
|
||||
first_atom(atom_t a, int match)
|
||||
{ text t;
|
||||
|
||||
if ( !get_atom_text(a, &t) )
|
||||
{ return (atom_t)0; /* not a textual atom */
|
||||
} else
|
||||
{ size_t len = t.length;
|
||||
wchar_t buf[256];
|
||||
wchar_t *out, *s;
|
||||
int i;
|
||||
wint_t c;
|
||||
atom_t rc;
|
||||
|
||||
if ( len <= 256 )
|
||||
out = buf;
|
||||
else
|
||||
out = PL_malloc(len*sizeof(wchar_t));
|
||||
|
||||
for(s=out,i=0; (c=fetch(&t,i)); s++,i++)
|
||||
{ if ( c == '*' && match == STR_MATCH_LIKE )
|
||||
{ if ( i == 0 ) /* like '*...' */
|
||||
return (atom_t)0;
|
||||
len = i; /* only up to the first * */
|
||||
}
|
||||
*s = sort_point(c)>>8;
|
||||
}
|
||||
|
||||
rc = PL_new_atom_wchars(len, out);
|
||||
|
||||
if ( out != buf )
|
||||
PL_free(out);
|
||||
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************
|
||||
* MATCH *
|
||||
*******************************/
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
With the introduction of wide characters there are two versions of the
|
||||
match() function, one using char* and one using a structure and index to
|
||||
fetch characters. Overall performance of the first function is about
|
||||
twice as good as the general one and as most data will be handled by
|
||||
this function in practice I think it is worthwhile to have two
|
||||
implementations. Both implementations are very similar in design and
|
||||
likely to have the same bugs. If you find one, please fix it in both
|
||||
branches!
|
||||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
static const charA *
|
||||
nextwordA(const charA *s)
|
||||
{ while(*s && iswalnum(*s))
|
||||
s++;
|
||||
while(*s && !iswalnum(*s))
|
||||
s++;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
#define cmp_pointA(i) (sort_pointA(i)>>8)
|
||||
|
||||
|
||||
static int
|
||||
matchA(int how, const charA *f, const charA *l)
|
||||
{ switch(how)
|
||||
{ case STR_MATCH_EXACT:
|
||||
{ for( ; *l && *f; l++, f++ )
|
||||
{ if ( cmp_pointA(*l) != cmp_pointA(*f) )
|
||||
return FALSE;
|
||||
}
|
||||
if ( *l == '\0' && *f == '\0' )
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
case STR_MATCH_PREFIX:
|
||||
{ for( ; *l && *f; l++, f++ )
|
||||
{ if ( cmp_pointA(*l) != cmp_pointA(*f) )
|
||||
return FALSE;
|
||||
}
|
||||
if ( *f == '\0' )
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
case STR_MATCH_SUBSTRING: /* use Boyle-More! */
|
||||
{ const charA *h;
|
||||
const charA *f0 = f;
|
||||
|
||||
for(h=l; *h; h++)
|
||||
{ for( l=h,f=f0; *l && *f; l++, f++ )
|
||||
{ if ( cmp_pointA(*l) != cmp_pointA(*f) )
|
||||
break;
|
||||
}
|
||||
if ( *f == '\0' )
|
||||
return TRUE;
|
||||
if ( *h == '\0' )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
case STR_MATCH_WORD:
|
||||
{ const charA *h;
|
||||
const charA *f0 = f;
|
||||
|
||||
for(h=l; *h; h = nextwordA(h))
|
||||
{ for( l=h,f=f0; *l && *f; l++, f++ )
|
||||
{ if ( cmp_pointA(*l) != cmp_pointA(*f) )
|
||||
break;
|
||||
}
|
||||
if ( *f == '\0' )
|
||||
{ if ( *l == '\0' || !iswalnum(*l) )
|
||||
return TRUE;
|
||||
}
|
||||
if ( *l == '\0' )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
case STR_MATCH_LIKE: /* SeRQL like: * --> wildcart */
|
||||
{ typedef struct chp { const charA *pattern;
|
||||
const charA *label; } chp;
|
||||
chp chps[MAX_LIKE_CHOICES];
|
||||
int chn=0;
|
||||
|
||||
for( ; *l && *f; l++, f++ )
|
||||
{ if ( *f == '*' )
|
||||
{ f++;
|
||||
|
||||
if ( *f == '\0' ) /* foo* */
|
||||
return TRUE;
|
||||
|
||||
search_like:
|
||||
while ( *l && cmp_pointA(*l) != cmp_pointA(*f) )
|
||||
l++;
|
||||
|
||||
if ( *l )
|
||||
{ if ( chn >= MAX_LIKE_CHOICES )
|
||||
{ Sdprintf("rdf_db: too many * in `like' expression (>%d)",
|
||||
MAX_LIKE_CHOICES);
|
||||
return FALSE;
|
||||
}
|
||||
chps[chn].pattern = f;
|
||||
chps[chn].label = l+1;
|
||||
chn++;
|
||||
|
||||
continue;
|
||||
} else
|
||||
goto retry_like;
|
||||
}
|
||||
|
||||
if ( cmp_pointA(*l) != cmp_pointA(*f) )
|
||||
goto retry_like;
|
||||
}
|
||||
if ( *l == '\0' && (*f == '\0' ||
|
||||
(*f == '*' && f[1] == '\0')) )
|
||||
return TRUE;
|
||||
|
||||
retry_like:
|
||||
if ( chn > 0 )
|
||||
{ chn--;
|
||||
f = chps[chn].pattern;
|
||||
l = chps[chn].label;
|
||||
goto search_like;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
default:
|
||||
assert(0);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static unsigned int
|
||||
nextword(text *txt, unsigned int i)
|
||||
{ while(i<txt->length && iswalnum(fetch(txt, i)))
|
||||
i++;
|
||||
while(i<txt->length && !iswalnum(fetch(txt, i)))
|
||||
i++;
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
#define cmp_point(i) (sort_point(i)>>8)
|
||||
|
||||
|
||||
int
|
||||
match_atoms(int how, atom_t search, atom_t label)
|
||||
{ text l, f;
|
||||
|
||||
if ( !get_atom_text(label, &l) ||
|
||||
!get_atom_text(search, &f) )
|
||||
return FALSE; /* error? */
|
||||
|
||||
if ( f.length == 0 )
|
||||
return TRUE;
|
||||
|
||||
if ( f.a && l.a )
|
||||
return matchA(how, f.a, l.a);
|
||||
|
||||
switch(how)
|
||||
{ case STR_MATCH_EXACT:
|
||||
{ if ( l.length == f.length )
|
||||
{ unsigned int i;
|
||||
|
||||
for(i=0; i<l.length; i++ )
|
||||
{ if ( cmp_point(fetch(&l, i)) != cmp_point(fetch(&f, i)) )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
case STR_MATCH_PREFIX:
|
||||
{ if ( f.length <= l.length )
|
||||
{ unsigned int i;
|
||||
|
||||
for(i=0; i<f.length; i++ )
|
||||
{ if ( cmp_point(fetch(&l, i)) != cmp_point(fetch(&f, i)) )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
case STR_MATCH_SUBSTRING: /* use Boyle-More! */
|
||||
{ if ( f.length <= l.length )
|
||||
{ unsigned int i, s;
|
||||
|
||||
for(s=0; s+f.length <= l.length; s++)
|
||||
{ for(i=0; i<f.length; i++)
|
||||
{ if ( cmp_point(fetch(&l, i+s)) != cmp_point(fetch(&f, i)) )
|
||||
goto snext;
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
snext:;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
case STR_MATCH_WORD:
|
||||
{ if ( f.length <= l.length )
|
||||
{ unsigned int i, s;
|
||||
|
||||
for(s=0; s+f.length <= l.length; s = nextword(&l, s))
|
||||
{ for(i=0; i<f.length; i++)
|
||||
{ if ( cmp_point(fetch(&l, i+s)) != cmp_point(fetch(&f, i)) )
|
||||
goto wnext;
|
||||
}
|
||||
if ( i+s == l.length || !iswalnum(fetch(&l,i+s)) )
|
||||
return TRUE;
|
||||
|
||||
wnext:;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
case STR_MATCH_LIKE: /* SeRQL like: * --> wildcart */
|
||||
{ unsigned int ip, il;
|
||||
typedef struct chp { unsigned int ip;
|
||||
unsigned int il;
|
||||
} chp;
|
||||
chp chps[MAX_LIKE_CHOICES];
|
||||
int chn=0;
|
||||
|
||||
for(ip=il=0; il < l.length && ip < f.length; ip++, il++ )
|
||||
{ if ( fetch(&f, ip) == '*' )
|
||||
{ ip++;
|
||||
|
||||
if ( ip == f.length ) /* foo* */
|
||||
return TRUE;
|
||||
|
||||
search_like:
|
||||
while ( il < l.length &&
|
||||
cmp_point(fetch(&l, il)) != cmp_point(fetch(&f, ip)) )
|
||||
il++;
|
||||
|
||||
if ( il < l.length )
|
||||
{ if ( chn >= MAX_LIKE_CHOICES )
|
||||
{ Sdprintf("rdf_db: too many * in `like' expression (>%d)",
|
||||
MAX_LIKE_CHOICES);
|
||||
return FALSE;
|
||||
}
|
||||
chps[chn].ip = ip;
|
||||
chps[chn].il = il+1;
|
||||
chn++;
|
||||
|
||||
continue;
|
||||
} else
|
||||
goto retry_like;
|
||||
}
|
||||
|
||||
if ( cmp_point(fetch(&l, il)) != cmp_point(fetch(&f, ip)) )
|
||||
goto retry_like;
|
||||
}
|
||||
if ( il == l.length && (ip == f.length ||
|
||||
(fetch(&f,ip) == '*' && ip+1 == f.length)) )
|
||||
return TRUE;
|
||||
|
||||
retry_like:
|
||||
if ( chn > 0 )
|
||||
{ chn--;
|
||||
ip = chps[chn].ip;
|
||||
il = chps[chn].il;
|
||||
goto search_like;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
default:
|
||||
assert(0);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************
|
||||
* LANGUAGE MATCH *
|
||||
*******************************/
|
||||
|
||||
typedef struct lang_choice
|
||||
{ int langp; /* points after - */
|
||||
int patp; /* points after *- */
|
||||
} lang_choice;
|
||||
|
||||
#define MAX_CHOICES 10 /* Max number of stars */
|
||||
|
||||
typedef struct
|
||||
{ int il, ip;
|
||||
text l, p;
|
||||
lang_choice choicepoints[MAX_CHOICES];
|
||||
int choice_count;
|
||||
} lang_state;
|
||||
|
||||
|
||||
static int
|
||||
create_chp(lang_state *s)
|
||||
{ if ( s->choice_count < MAX_CHOICES )
|
||||
{ lang_choice *cp = &s->choicepoints[s->choice_count];
|
||||
|
||||
cp->langp = s->il;
|
||||
cp->patp = s->ip+2;
|
||||
s->choice_count++;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
next_choice(lang_state *s)
|
||||
{ for ( ; s->choice_count > 0; s->choice_count-- )
|
||||
{ lang_choice *cp = &s->choicepoints[s->choice_count-1];
|
||||
int il = cp->langp;
|
||||
|
||||
for(; il<s->l.length; il++)
|
||||
{ if ( fetch(&s->l, il) == '-' )
|
||||
{ cp->langp = s->il = il+1;
|
||||
s->ip = cp->patp;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static atom_t ATOM_;
|
||||
static atom_t ATOM_star;
|
||||
|
||||
int
|
||||
atom_lang_matches(atom_t lang, atom_t pattern)
|
||||
{ lang_state s = {0};
|
||||
int cl, cp;
|
||||
|
||||
if ( lang == pattern ) /* exact match */
|
||||
return TRUE;
|
||||
|
||||
if ( !ATOM_ )
|
||||
{ ATOM_ = PL_new_atom("");
|
||||
ATOM_star = PL_new_atom("*");
|
||||
}
|
||||
|
||||
if ( lang == ATOM_ ) /* no language */
|
||||
return FALSE;
|
||||
if ( pattern == ATOM_star ) /* Everything matches "*" */
|
||||
return TRUE;
|
||||
|
||||
if ( !get_atom_text(lang, &s.l) ||
|
||||
!get_atom_text(pattern, &s.p) )
|
||||
return FALSE; /* exception? */
|
||||
|
||||
s.il=0; s.ip=0;
|
||||
for(;; s.ip++, s.il++)
|
||||
{ if ( s.ip == s.p.length )
|
||||
return TRUE;
|
||||
if ( s.il == s.l.length )
|
||||
{ if ( fetch(&s.p, s.ip) == '*' )
|
||||
return TRUE;
|
||||
if ( !next_choice(&s) )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
cl = fetch(&s.l, s.il);
|
||||
cp = fetch(&s.p, s.ip);
|
||||
if ( cl == cp )
|
||||
continue;
|
||||
if ( sort_point(cl)>>8 == sort_point(cp)>>8 )
|
||||
continue;
|
||||
|
||||
if ( cp == '*' )
|
||||
{ if ( s.ip+1 == s.p.length )
|
||||
return TRUE;
|
||||
if ( (s.ip == 0 || fetch(&s.p, s.ip-1) == '-') &&
|
||||
fetch(&s.p, s.ip+1) == '-' )
|
||||
{ if ( !create_chp(&s) )
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !next_choice(&s) )
|
||||
return FALSE;
|
||||
}
|
||||
}
|
64
packages/semweb/atom.h
Normal file
64
packages/semweb/atom.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/* $Id$
|
||||
|
||||
Part of the SWI-Prolog Semweb package
|
||||
|
||||
Author: Jan Wielemaker
|
||||
E-mail: wielemak@science.uva.nl
|
||||
WWW: http://www.swi-prolog.org
|
||||
Copyright (C): 2006, University of Amsterdam
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef ATOM_H_INCLUDED
|
||||
#define ATOM_H_INCLUDED
|
||||
|
||||
#define MAX_LIKE_CHOICES 100 /* max *'s in like pattern */
|
||||
|
||||
#define STR_MATCH_CASE 0x0 /* Default: perfect match */
|
||||
#define STR_MATCH_PLAIN 0x1 /* Same, also match qualifier */
|
||||
#define STR_MATCH_EXACT 0x2 /* case-insensitive */
|
||||
#define STR_MATCH_SUBSTRING 0x3 /* substring */
|
||||
#define STR_MATCH_WORD 0x4 /* whole word */
|
||||
#define STR_MATCH_PREFIX 0x5 /* prefix */
|
||||
#define STR_MATCH_LIKE 0x6 /* SeRQL *like* match */
|
||||
/* MAX: 0x7 (3 bits in triple) */
|
||||
|
||||
typedef unsigned char charA;
|
||||
typedef wchar_t charW;
|
||||
|
||||
typedef struct text
|
||||
{ const charA *a;
|
||||
const charW *w;
|
||||
size_t length;
|
||||
} text;
|
||||
|
||||
|
||||
typedef struct atom_info
|
||||
{ atom_t handle;
|
||||
text text;
|
||||
int resolved;
|
||||
int rc; /* TRUE if text atom */
|
||||
} atom_info;
|
||||
|
||||
|
||||
int cmp_atoms(atom_t a1, atom_t a2);
|
||||
int cmp_atom_info(atom_info *a1, atom_t a2);
|
||||
atom_t first_atom(atom_t a, int match);
|
||||
int match_atoms(int how, atom_t search, atom_t label);
|
||||
unsigned int atom_hash_case(atom_t a);
|
||||
int atom_lang_matches(atom_t lang, atom_t pattern);
|
||||
|
||||
#endif /*ATOM_H_INCLUDED*/
|
1161
packages/semweb/atom_map.c
Normal file
1161
packages/semweb/atom_map.c
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user